?? start_gateway.sh
字號:
#!/bin/shGWVER=2.2echo -e "\n\nLoading AODV Gateway version $GWVER...\n"IPTABLES=/sbin/iptablesKERNEL_AODV=kernel_aodvEXTIF="eth0" #interface to use for gatewayingINTIF="wlan0" #interface to connect to AODV Network# The node will assume all destinations that are not in INTIF's# subnet are on the internet and not part of the AODV subnet.# Because of this you may have to alter INTIF's subent to match# the subnet that all of the other AODV nodes are one.echo " Gateway Interface: $EXTIF"echo " AODV Interface: $INTIF"echo " Enabling IP forwarding"echo "1" > /proc/sys/net/ipv4/ip_forwardecho " Zero MIN_DELAY for routing table changes"echo "0" > /proc/sys/net/ipv4/route/min_delay$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPTecho " Enabling Masquerading on $EXTIF"$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADEecho " Starting Kernel AODV..."echoinsmod $KERNEL_AODV use_dev=$INTIF aodv_gateway=1
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -