boum.org a besoin d'argent :
We should set up a bash-script for the automatic NVRAM- and tool-configuration of friendly wrt's based on our main wrt-wardriving sets placed on building roofs.
During the last reflash I noticed all the changes which have been made (notice that cyberforat's wrt hardware is version 2.0).
The operations made are:
firstboot
dropbear
passwd ## (write 2 times new password)
nvram set lan_ipaddr=192.168.???.1 ## choose an IP range else than 192.168.1.* for your LAN
nvram set boot_wait=on
nvram set wl0_mode=sta ## change from access point to station (works also with wet mode "wet")
nvram set lan_ifnames='vlan0 eth2 eth3' ## split the bridge (WARNING: depending on the model the interfaces may have different names!) (nvram set lan_ifnames='vlan0 vlan1 eth2' , on a wrt54gs_v4)
# Obsoleted settings
# nvram set wifi_gateway=192.168.1.1
# nvram set wifi_netmask=255.255.255.0
# wifi_proto=static
# wifi_ipaddr=192.168.1.99
# wifi_ifname=eth1
# New settings with eth1 as WAN interface
nvram set wan_ifname=eth1
nvram set wan_gateway=192.168.1.1
nvram set wan_proto=static
nvram set wan_netmask=255.255.255.0
nvram set wan_ipaddr=192.168.1.99
# Optional
# nvram set clkfreq=216 ## adjust clock frequency (check if really needed for your model)
# Obsoleted setting
# rm /etc/S45firewall ; cp /rom/etc/S45firewall # change $WAN to 'nvram get wifi_ifname'
rm /etc/resolv.conf ; echo nameserver 193.155.207.61 > /etc/resolv.conf # edit a new /etc/resolv.conf with your beloved DNS servers
rm /etc/S50telnet
nvram set wl0_ssid=??? ## choose the most useful SSID
echo route add default gw 192.168.1.1 eth1 > /etc/init.d/S98route ; chmod 755 /etc/init.d/S98route ## set up a routing initscript just to be sure you will have a default route
nvram commit ## without committing every nvram new setting will be lost!
ipkg update
ipkg install wl
rm /etc/profile ; cp /rom/etc/profile /etc/ ; echo alias scan="wl scan ; wl scanresults" > /etc/profile ## this will spare you a lot of fingertipping... (SYNTAX ERRORR: > cancels everything!!)
# Optional
# rm /etc/banner ; cp /rom/etc/banner /etc/ ; vi /etc/banner ## just for fun
# Configure dnsmasq with you favourite settings for DHCP
So, this just for the basic. Optional we could already set up -Kismet-, -Macchanger- and -Aircrack- (meta package), but for it we DO need to configure nfs (better sshfs or afs) on a local computer! All this packages require -florian- and -florian.experimental- as ipkg sources!
Of course we could do a standard script, but the wery best way would be to have dialogs for some of the nvram variables (ex: lan_ipaddr, wifi_ipaddr, ...)
A complete list of nvram settings working in our standard way can be found here:
other useful scripts are:
- tarjffs.sh: backup your wrt configuration (it does not backs up the NVRAM)
--
OtmMto - 10 Apr 2006