Seamlessly use WANO and intranet at the same time.
Linux users in intranet can use WANO and intranet at the same time seamlessly.
steps:
current_default_gw=`route -n | grep '^0\.0\.\0\.0[ \t]\+[1-9][0-9]*\.[1-9][0-9]*\.[1-9][0-9]*\.[1-9][0-9]*[ \t]\+0\.0\.0\.0[ \t]\+[^ \t]*G[^ \t]*[ \t]' | awk '{print $2}'`
sudo route del default
sudo route add default gw 10.254.92.1 dev wlan0
if [ x$1 != 'x' ] ; then
??? #in case you are not using this default gateway, you can specify your eth0 gateway
??? gw=$1
else
???
??? gw=${current_default_gw}
fi
#All started with 10.xxx.xxx.xxx
sudo route add -net 10.0.0.0 netmask 255.0.0.0 gw ${gw} dev eth0
#your? local route which not start with 10.*
sudo route add -net 93.183.1.0 netmask 255.255.255.0 gw ${gw} dev eth0
sudo route add -net 87.254.0.0 netmask 255.255.0.0 gw ${gw} dev eth0