I am new to Linux and I am tying to connect to the internet from my Zaurus 5600 through my Fedora Core 1 desktop via usb cradle. I have the original sharp rom on my Zaurus and connect to the internet from the desktop by DSL. I have been able to set up SSH and Samba and can succesfully move files back and forth. I can ping my zaurus from my desktop and ping my desktop from my Zaurus so I know they are communicating. Most of the howtos I have found are for other distros that describe recompiling the kernel etc., or networking with windows. I am pretty sure I don't have to recompile with Fedora. Also, the articles I found are all 5000/5500 model. So I am hoping someone here can help me out. Here is what I have done so far.
ON DESKTOP I did the following:
Created /etc/rc.d/rc.ipmasq with the following:
#!/bin/sh
IPTABLES=/sbin/iptables
#All The lines below are NAT routing
# flush any old rules
$IPTABLES -F -t nat
# turn on NAT (IP masquerading for outgoing packets)
$IPTABLES -A POSTROUTING -t nat -o eth0 -j MASQUERADE
# enable IP forwarding (of incoming packets)
echo 1 > /proc/sys/net/ipv4/ip_forward
In /etc/rc.d/rc.local added:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
#added to connect to internet through usb and zaurus
/etc/rc.d/rc.ipmasq
In etc/hotplug/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
iptables -t nat -F
iptables -t nat -A POSTROUTING -j SNAT -o eth0 --to MY_IP
echo 1 > /proc/sys/net/ipv4/ip_forward
exit 0
IN /etc/sysconfig/network-scripts/ifcfg-usb0:
DEVICE=usb0
onBOOT=no
BOOTPROTO=static
BROADCAST=192.168.129.255
IPADDR=192.168.129.200
NETMASK=255.255.255.0
NETWORK=192.168.129.0
Then I did:
ifconfig usb0 192.168.129.1 netmask 255.255.255.255 up
route add -host 192.168.129.201 usb0
AS ROOT:
ifconfig usb0 192.168.129.1 netmask 255.255.255.255 up
route add -host 192.168.129.201 usb0
iptables -t nat -F
iptables -t nat -A POSTROUTING -j SNAT -o eth0 --[my DNS as it appears in my network configuration primary dns]
echo 1 > /proc/sys/net/ipv4/ip_forward
Blaclisted CDCether and acm in /etc/hotplug/blacklist
REBOOTED
On THE ZAURUS
edited /etc/resolv.conf:
domain mark.localhost.localdomain
nameserver 127.0.0.1
ADDED:
route add -host 192.168.129.1 usbd0
route delete -net 192.168.129.0/24 usbd0
route add default gw 192.168.129.1
MY NETWORK SETTINGS ARE:
LAN-TCP/IP
IP address 192.168.129.1
Subnet Mask 255.255.255.0
Gateway 192.168.129.1
Primary DNS 192.168.129.1
REBOOTED
When I open Opera and point to a website. it searches for 20 seconds and then I get "could not find the remote server". I don't think I did anything else except what I described here, so if I am supposed to edit any other files, I am not sure what. If anyone needs a log message in order to help me troubleshoot, just let me know what you need and I will post it. Thanks in advance for any help.
Mark