首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

Seamlessly use WANO and intranet at the same time

2014-06-03 
Seamlessly use WANO and intranet at the same time.Linux users in intranet can use WANO and intranet

Seamlessly use WANO and intranet at the same time.

Linux users in intranet can use WANO and intranet at the same time seamlessly.

steps:

    switch on wireless card on your laptopget the latest wano user/password, you will need it when you access internet.just create this shell script and exec the shell script

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

热点排行