I have a laptop setup with the following network interfaces:
eth0: wired ethernet to the wild, wild internet
eth1: 802.11g card in ad-hoc mode acting as an access point
ppp0: cellular card that also goes to the wild, wild internet
All three interfaces work just fine individually. The problem is when I
try to use ppp0 as a masquerade for computers connected to eth1.
When I run this rule, all is well and wireless clients connected to eth1
get internet access through eth0:
/sbin/iptables --table nat --append POSTROUTING --out-interface eth0 -j
MASQUERADE
But when I use this rule, clients can't access the internet:
/sbin/iptables --table nat --append POSTROUTING --out-interface ppp0 -j
MASQUERADE
I am able to ping internet hosts through ppp0 on my laptop like this:
ping -I ppp0 google.com (works fine, confirmed with tcpdump)
ping -I eth0 google.com
However, I can't traceroute via ppp0. I get this:
$ sudo traceroute -i ppp0 google.com
traceroute to google.com (64.233.167.99), 30 hops max, 40 byte packets
send: No buffer space available
Strange.
Clients connected to my laptop via the eth1 wireless are able to ping my
laptop and ssh to it and the like.
By way of information, I use "/usr/sbin/pppd call sprint" ("sprint" is
the file with my user info) to enable my ppp connection. Any ideas why I
can't masquerade through ppp0?
Thanks in advance!
--Dave
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/