Lines Matching refs:sudo
102 sudo ifconfig $HOST_DEV $HOST_IP netmask $NETMASK up
156 sudo sysctl -w net.ipv4.ip_forward=1
157 sudo iptables -F
158 sudo iptables -t nat -F
159 sudo iptables -t nat -A POSTROUTING -o $LAN_DEV -j MASQUERADE
160 sudo iptables -P FORWARD ACCEPT
161 sudo ifconfig $HOST_DEV $HOST_IP netmask $NETMASK up
165 sudo iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
166 sudo iptables -A FORWARD -m state --state NEW -i $HOST_DEV -j ACCEPT
167 sudo iptables -P FORWARD DROP
168 sudo ifconfig usb0 $HOST_IP netmask $NETMASK up
171 sudo sysctl -w net.ipv4.ip_forward=0
172 sudo iptables -F
173 sudo iptables -t nat -F
178 sudo brctl addbr $BRIDGE || return 0 # all good
179 sudo brctl setfd $BRIDGE 0
180 sudo ifconfig $LAN_DEV 0.0.0.0
181 sudo brctl addif $BRIDGE $LAN_DEV
182 sudo dhclient $BRIDGE || {
190 sudo brctl delif $BRIDGE $HOST_DEV 2>/dev/null || true # ignore
191 sudo ifconfig $HOST_DEV 0.0.0.0
192 sudo brctl addif $BRIDGE $HOST_DEV
195 sudo ifconfig $BRIDGE down || true # ignore errors
196 sudo brctl delbr $BRIDGE || true
197 sudo dhclient $LAN_DEV