OESF Portables Forum
Everything Else => Desktop Operating Systems Issues => Zaurus General Forums => Archived Forums => Linux Issues => Topic started by: jshufelt on May 21, 2004, 12:23:36 pm
-
Hello,
I am running OZ 3.3.5 with Debian kernel 2.4.24. I did an apt-get to install the hotplug and usbutils for hotplugging support. I dropped the following script into the /etc/hotplug/usb directory but I lose my static internet connection. I don\'t undestand why. I can ssh to my zaurus when I put it in the cradle though. Any suggestions? --Jonathan
#! /bin/bash
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
fi
iptables -t nat -F
iptables -t nat -A POSTROUTING -j SNAT -o eth0 --to 192.253.72.59
echo 1 ] /proc/sys/net/ipv4/ip_forward
-
Actually,
The problem is with my rules. Hotplugging works quite well in debian after installing hotplug and usbutils. Anybody have any suggestions. I don\'t see anything wrong with the rules. I am trying to IP masqurade the packets from my zaurus at 192.168.129.201 through usb0 192.168.129.1 to my ip address 192.253.72.59. It looks easy. --Jonathan
-
Well..I fixed my own problem. Using Debian unstable I install the hotplug .deb and the usb-utils .deb. I then compile the usbnet driver into a module so I could watch it load. In /etc/hotplug make a directory called usb and drop the follwing file in usb directory and call it usbnet.
#!/bin/bash
typeset -i num
num=`ifconfig | grep usb0 | wc -l`
if [ $num -eq 0 ] ; then
ifconfig usb0 192.168.129.1 netmask 255.255.255.255 up
route add -host 192.168.129.201 usb0
fi
echo 1 ] /proc/sys/net/ipv4/ip_forward
#iptables -t filter -F FORWARD
#iptables -t filter -P FORWARD DROP
#iptables -t filter -A FORWARD -s $IF_POINTOPOINT/$IF_NETMASK -j ACCEPT
#iptables -t filter -A FORWARD -d $IF_POINTOPOINT/$IF_NETMASK -j ACCEPT
iptables -t nat -F PREROUTING
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -F POSTROUTING
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -F OUTPUT
iptables -t nat -P OUTPUT ACCEPT