OESF Portables Forum
Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Security and Networking => Topic started by: Quickfry on June 29, 2005, 04:06:16 pm
-
Howdy. I'm trying to get online with my C1000 (using OZ/OPIE).
I've got my host machine (Linux box) so it can ping the Zaurus, and vice versa.
Here's the hosts ifconfig and route
ifconfig
eth0 Link encap:Ethernet HWaddr 00:00:6C:D9:4D:72
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:211987 errors:0 dropped:0 overruns:0 frame:0
TX packets:137813 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:270751662 (258.2 Mb) TX bytes:14165835 (13.5 Mb)
Interrupt:11 Base address:0xe000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1840 errors:0 dropped:0 overruns:0 frame:0
TX packets:1840 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:618292 (603.8 Kb) TX bytes:618292 (603.8 Kb)
usb0 Link encap:Ethernet HWaddr 92:8A:46:2B:F9:0B
inet addr:192.168.129.1 Bcast:192.168.129.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1675 errors:0 dropped:0 overruns:0 frame:0
TX packets:1687 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:85710 (83.7 Kb) TX bytes:132950 (129.8 Kb)
route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.129.0 * 255.255.255.0 U 0 0 0 usb0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
loopback localhost 255.0.0.0 UG 0 0 0 lo
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
192.168.0.1 is the windows box that connects to the net (my default gw)
the zaurus is setup as:
192.168.129.201
routes are:
Dest: 192.168.129.0 Gateway: * Mask: 255.255.255.0 Iface: usbd0
What routes do I need to add to each machine to get this beast online?
-
You need to configure your PC for masquerading:
iptables -A POSTROUTING -o usb0 -j MASQUERADE
iptables -A POSTROUTING -o eth0 -j SNAT --to-source 192.168.0.2
echo "1" >/proc/sys/net/ipv4/ip_forward
Hope that's it...
Cheers
Philipp
-
iptables: No chain/target/match by that name
What does that mean?
Are there any modules besides ip_tables that need to be loaded?
-
Ok, it's all working now. I added -t nat before the -A in those commands, and it worked like a dream!
Thanks!
-
Ahhh, sorry, it was late and I just did a little bit of copy & paste... glad it's working for you
Cheers
Philipp
-
even quicker, on the linux box:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
might be good idea to first do
iptables -t nat -F