All pastes #25321 Raw Edit

Someone

public text v1 · immutable
#25321 ·published 2005-10-12 16:02 UTC
rendered paste body
rmmod acm >/dev/null 2>&1
ifconfig usb0 down >/dev/null 2>&1
rmmod usbnet >/dev/null 2>&1
modprobe usbnet >/dev/null 2>&1
typeset -i num
num=`ifconfig | grep usb0 | wc -l`
if [ $num -eq 0 ] ; then
   ifconfig usb0 192.168.129.1 netmask 255.255.255.0 up
   route add -host 192.168.129.201 usb0 >/dev/null 2>&1
   iptables -t nat -F
   iptables -t nat -A POSTROUTING -j SNAT -o eth0 --to 55.55.55.55
   echo 1 > /proc/sys/net/ipv4/ip_forward
   ssh root@192.168.129.201 /sbin/route add -host 192.168.129.1 usbd0
   ssh root@192.168.129.201 /sbin/route delete -net 192.168.129.0/24 usbd0
   ssh root@192.168.129.201 /sbin/route add default gw 192.168.129.1
fi