📄 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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -