These scripts can be launched through the dashboard.
Permuting LAN and WAN ports.
This can be useful if you need the 4 port switch on your private (internet) network.
The public network is still available on the internet port.
Don't forget to change the internet connection from internet port to one of the lan ports.
Note that your mac address can change. So check your "node setup" page and set the mac address accordingly.
Use the dashboard "send multiple command" and copy paster the script below.
lanIfName=$(uci get network.lan.ifname)
wanIfName=$(uci get network.wan.ifname)
echo old config : lan: $lanIfName wan: $wanIfName
echo ---------------
uci show network
if [ "$lanIfName" != "" ] && [ "$wanIfName" != "" ]
then
echo
echo switching interfaces
uci set network.lan.ifname="$wanIfName"
uci set network.wan.ifname="$lanIfName"
echo new config:
echo ---------------
uci show network
echo
echo 'if ok, please send these commands "uci commit network;reboot"'
fi
Then read the output. If everything looks ok, you have to send these
uci commit network
reboot
Reflash your router.
You could first reboot your router to free some memory, then connect to the dashboard. (Note: after reboot, it can take some minutes before you can reconnect the dashboard)
- free some more memory with
pkill chilli
For low memory routers like WRT54GL, you should kill much more processes (these routers can be tricky to reflash):
pkill logger ; pkill hotplug2; pkill -9 chilli; pkill dropbear;pkill syslogd; pkill ntpd;pkill klogd;pkill hostapd
- download the firmware from an http server with the wget command. (Change the url with the appropriate firmware you want to download)
wget -O firmware.bin http://worldspot.net/wsfirm/backfire-r30950/ar71xx/openwrt-ar71xx-tl-wr1043nd-v1-squashfs-sysupgrade.bin
Note that on low memory routers, your router might freeze. You must then reboot and retry...
Check that the downloaded file md5 is ok with
md5sum firmware.bin
Then you flash with
sysupgrade -n firmware.bin
Important note:
The sysupgrade command could give a message like "error contacting the router" immediately.
It is probable that the flashing process is still running.
Please be patient and wait several minutes. Don't unplug the router during these minutes.
More scripts to come...