Ethernet + MASQ - HOWTO anywhere?


Subject: Ethernet + MASQ - HOWTO anywhere?
From: Graham Leggett (minfrin@sharp.fm)
Date: Tue Sep 04 2001 - 13:39:41 MDT


Hi all,

I've been searching the archives for some kind of description on how to
get MOL to talk to the internet via a Linux based modem, but all I can
seem to find are many questions and no answers.

My setup is already configured to provide masqueraded internet access
for a subnet connected to my Powerbook's ethernet port. This works great
with external machines. I've given MOL a static IP address on the same
subnet, and I can successfully ping MOL from Linux. From MOL I can
access a Linux based webserver running on 127.0.0.1, but I cannot access
the internet.

A tcpdump shows that packets are being received from MOL, but they are
not being routed via ppp0, even though the default route is set up
correctly:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
213.121.143.71 0.0.0.0 255.255.255.255 UH 0 0 0
ppp0
192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0
lo
0.0.0.0 213.121.143.71 0.0.0.0 UG 0 0 0
ppp0

The tcpdump looks like this:

21:35:58.398927 eth0 < 192.168.100.3.1543 > 64.49.223.65.www: S
801123840:801123840(0) win 32768 <mss 1460,wscale 0,nop> (DF)
21:35:58.407009 if61 > 192.168.100.3.1543 > 64.49.223.65.www: S
801123840:801123840(0) win 32768 <mss 1460,wscale 0,nop> (DF)

The ip-up.local script looks like this:

echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
/sbin/ifconfig eth0 192.168.100.1 netmask 255.255.255.0 up
/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables -t nat -A POSTROUTING -o $1 -j MASQUERADE

MOL is configured with a static IP address 192.168.100.3/24 and a
gateway of 192.168.100.1 (the Linux machine).

The /etc/molrc file contains netdev: eth0 -sheep

Kernel is v2.4.7.

Is there anything else you need to do to get ethernet to work...?

Regards,
Graham

-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."




This archive was generated by hypermail 2a24 : Tue Sep 04 2001 - 12:47:53 MDT