QUOTE(louigi600 @ Jul 11 2007, 10:29 PM)
On the linux pc:
enable ip forwarding on the ubuntu box
sysctl -w net.ipv4.ip_forward=1
echo 1 > /proc/sys/net/ipv4/ip_forward
You need a dhcp server running on usb0 (not sure if ubuntu does that for you .. on slackware I did something like "dhcpcd usb0" but if you can bing teh ubuntu box I guess you're ok for this)
and you will also most probabbly need masquerading (iptables will help in this) if you want to surf the net.
I actually used source ip postrouting nat to do more or less the same thing
iptables -t nat -A POSTROUTING -j SNAT -o <DEVICE> --to <IP ADDRESS OF LINUX PC>
were <IP ADDRESS OF LINUX PC> is the ip of the nic connected to the windows box with internet access and <DEVICE> is the nic that you use co coonect to the win box (probabbly eth0).
On the Z:
route add default gw <IP ADDRESS OF usb0 device on PC>
Last time I did this on my 5500 was a long time ago ... forgive me if I do not remember all the details.
thanks for your effort luigi. but it didn't work. here's what i did:
- i enabled the ip forwarding as you instructed
- since i can ping the linux box from the Z and vice versa i skipped the dhcpcd usb0 step
- i did the iptables part on the linux box as you instructed me. i did this;
iptables -t nat -A POSTROUTING -j SNAT -o eth0 --to 192.168.0.1 --> default ip adress of the windows box when you turn ICS with dhcp on
- and then i did this on the Z :route add default gw 192.168.129.1 -->ip adress of the usb0 interface on the linux box
- and then i got nothing. ping still says "network ureachable", no internet, no nothing.
- last i tried dhcpcd usb0 which removed the ip adress from that interface.and still nothing.
i repeat, i know next to nothing about networks&stuff so i didn't understand 90% of the stuff you told me to do. i did know how to apply them though...