ipkg update ipkg install iptables-extra kmod-iptables-extra libpthread libgcc ipkg install http://wirelesstoronto.ca/dist/wifidog_1.1.5-1_mipsel_whiterussian.ipk vi /etc/wifidog.conf
AuthServer { Hostname auth.wirelesstoronto.ca SSLAvailable yes Path / }
AuthServer { Hostname auth.wirelesstoronto.ca SSLPort 443 Path / }
ipkg install ntpclient cd /etc/init.d wget http://wirelesstoronto.ca/dist/S55ntpclient chmod +x /etc/init.d/S55ntpclient /etc/init.d/S55ntpclient echo EST5EDT,M3.2.0/02:00,M11.1.0/02:00 > /etc/TZ cd /etc/init.d cp S99done S99done.real rm S99done mv S99done.real S99done vi /etc/init.d/S99done
# start crond /usr/sbin/crond -c /etc/crontabs
mkdir /etc/crontabs touch /etc/crontabs/root ln -sf /etc/crontabs/root /etc/crontab /usr/sbin/crond -c /etc/crontabs vi /etc/crontab
0 * * * * /usr/sbin/ntpclient -l -h pool.ntp.org -i 5 -s
killall crond /usr/sbin/crond -c /etc/crontabs ipkg install openvpn mkdir /etc/openvpn cd /etc/openvpn wget http://wirelesstoronto.ca/dist/client.conf vi /etc/openvpn/client.conf
cd /etc/openvpn wget http://wirelesstoronto.ca/dist/ca.crt
scp wireless@openvpn.wirelesstoronto.ca:easy-rsa/keys/client(NODEID).* .
chmod 600 client*.key cd /etc/init.d wget http://wirelesstoronto.ca/dist/S90openvpn chmod +x S90openvpn reboot
All instructions are the same, but use the correct OpenWRT package, of course.
By default, the router comes configured with the LAN IP address 192.168.10.1. Either change this to 192.168.1.1 before installing OpenWRT, or after installing OpenWRT, issue the additional commands:
nvram unset dhcp_start nvram unset dhcp_end nvram unset dhcp_dns nvram commit
These variables confuse dnsmasq, and aren't required.
NYC Wireless have a good “walkthrough”:http://www.nycwireless.net/tiki-pagehistory.php?page=WifiDog&preview=39
Perhaps refer to (newer?) instructions at:
nvram set wl_ssid=wirelesstoronto nvram set wl_channel=1
nvram set wl0_lazywds=0 nvram set wl0_wds=00:13:10:44:3b:50 00:13:10:3d:65:59 00:13:10:2d:a9:98 nvram commit
rm /etc/init.d/S??dnsmasq
reboot
nvram set static_route=0.0.0.0:0.0.0.0:192.168.1.1:1:br0 nvram commit
cd easy-rsa . ./vars
./build-key client[NODEID]
scp wireless@pwd.ca:easy-rsa/keys/client<NODEID>.crt /etc/openvpn scp wireless@pwd.ca:easy-rsa/keys/client<NODEID>.key /etc/openvpn
(it'll prompt you for the wireless@pwd.ca password each time)
Might be especially bad on a WR850G.
mtd -r erase nvram
(From the OpenWRT FAQ.)
cd /tmp wget http://downloads.openwrt.org/people/kaloz/nvram-clean.sh (having access issues with the original URL http://wirelesstoronto.ca/dist/nvram-clean.sh PD, May 10, 2007) chmod a+x /tmp/nvram-clean.sh /tmp/nvram-clean.sh
The before and after sizes will show you how much space was recovered.
The nvram-clean.sh script does not commit the changes to NVRAM so you will have to do this manually with:
nvram commit
telnet 192.168.1.1 nvram set lan_proto=static nvram set lan_ipaddr=192.168.1.10 nvram set lan_gateway=192.168.1.1 nvram set lan_dns=192.168.1.1 nvram set wl_ssid=wirelesstoronto nvram set wl_channel=1 rm /etc/init.d/S50dnsmasq nvram commit reboot
add to the end of /etc/firewall.user:
### secure the LAN iptables -A forwarding_rule -s 192.168.1.0/24 -d 172.18.92.0/24 -j DROP iptables -A input_rule -s 192.168.1.0/24 -d 172.18.92.0/24 -j DROP
where 192.168.17.0 is the wired LAN. you won't be able to ping 192.168.17.1, but traffic will still flow through it
You'd want to do this if you want wifi users to authenticate to wifidog, but for computers plugged into the ethernet ports to not have to authenticate.
The original config on the router is probably:
lan_ifname="br0" lan_proto=static lan_ipaddr=192.168.1.1 lan_netmask=255.255.255.0 wifi_ifname="" wifi_proto="" wifi_ipaddr="" wifi_netmask="" lan_ifnames="vlan0 eth1 eth2"
Run these commands:
nvram set lan_ifname=vlan0 nvram set lan_proto=static nvram set lan_ipaddr=192.168.2.1 nvram set lan_netmask=255.255.255.0 nvram set wifi_ifname=eth1 nvram set wifi_proto=static nvram set wifi_ipaddr=192.168.1.1 nvram set wifi_netmask=255.255.255.0 nvram set lan_ifnames=vlan0 nvram commit
Edit /etc/dnsmasq.conf, adding these lines:
dhcp-range=eth1,192.168.1.100,192.168.1.250,255.255.255.0,12h dhcp-range=vlan0,192.168.2.100,192.168.2.250,255.255.255.0,12h
Edit /etc/wifidog.conf, and change “GatewayInterface” to eth1
Reboot
(Done!)