OpenWRT
From Telecomix Crypto Munitions Bureau
[edit] Crontab to reconnect the wifi
crontab -e
It will open in the editor called vi. Put it in "insert mode" by pressing:escape + i
Then copy-paste this line:
* * * * * $([ $(ifconfig wl0|grep "inet addr"|wc -l) == "0" ] && [ $(ps auxw|grep wifi|grep -v "grep wifi"|wc -l) == "0" ] && wifi up)Save and exit vi: Press
escape + : then write: wq[enter]
[edit] Getting around DNS censorship: have your own resolver
# opkg install bind-server # cp /etc/bind/named.conf.example /etc/bind/named.conf # /etc/init.d/dnsmasq stop # /etc/init.d/named enable # /etc/init.d/named start
Add to /etc/config/dhcp:
config 'dnsmasq' ... ... ... option 'port' '0' config 'dhcp' 'lan' ...
Save the file and restart dnsmasq.
# /etc/init.d/dnsmasq start
From now on bind will handle all DNS requests from your LAN.