Author Topic: problem with hotplugging  (Read 3046 times)

jshufelt

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • http://
problem with hotplugging
« 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
_________________
sl5500 OZ
256MB SD, 256MB CF, Prism 2.5 Symbol Wifi CF
Nokia 3650 256MMC, Symbian v6.1
Soekris Net4521,  m0n0wall
Athlon XP,  Debian Sid

jshufelt

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • http://
problem with hotplugging
« Reply #1 on: May 21, 2004, 05:52:04 pm »
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
_________________
sl5500 OZ
256MB SD, 256MB CF, Prism 2.5 Symbol Wifi CF
Nokia 3650 256MMC, Symbian v6.1
Soekris Net4521,  m0n0wall
Athlon XP,  Debian Sid

jshufelt

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • http://
problem with hotplugging
« Reply #2 on: May 25, 2004, 12:28:41 pm »
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
_________________
sl5500 OZ
256MB SD, 256MB CF, Prism 2.5 Symbol Wifi CF
Nokia 3650 256MMC, Symbian v6.1
Soekris Net4521,  m0n0wall
Athlon XP,  Debian Sid