Quantcast
Channel: PirateBox Forum - PirateBox OpenWrt
Viewing all articles
Browse latest Browse all 3254

Re: [Help]Script to turn wifi off of piratebox

$
0
0
Small script on your request, it disables the wifi when you plug in the wan interface and re enables it when you pull the ethernet cable.
I put it on a pastebin clone for easy installation. [sprunge.us]

To get that function on your pbx, make sure you have internet and execute the following command:
Language: PHP
wget -O /etc/hotplug.d/iface/30-wifiTogle http://sprunge.us/MiLA

And to remove the script again, simply:
rm /etc/hotplug.d/iface/30-wifiTogle

Or simply remove the forwarding rule from the firewall and that way the clients connected to the wifi can't access the internet.
This can be done by either editing the file /etc/config/firewall , or by simply running these two commands:
uci delete firewall.$(uci show firewall | grep -m1 '\.@for.*\.src=lan' | awk -F'.' '{print $2}');
uci commit firewall

Viewing all articles
Browse latest Browse all 3254

Trending Articles