WAN connection through a Linux machine

WAN connection through a Linux machine

Dan Shimshoni danshimsh at gmail.com
Tue Apr 20 08:29:54 IDT 2010


Hello,
First, I don't know much about iptables.

Second, I have a Linux machine ("A") with two nics, which is connected
to the Internet via Bezeq ADSL router.
This machines runs a pppoe connection to the intenet, so the
connection is done via ppp0.
On eth1 I have an inner IP address which I set manually (192.168.0.10).

I have a second Linux machine ("B"), nearby. This machine is connected directly
to machine "A" via ethernet cable. On eth0 I have an inner IP address which
I set manually (192.168.0.11). So I can ping from 192.168.0.11 to 192.168.0.10.
	
Sometimes I want to connect from machine "B" to the Internet via machine "A".
I suppose this is possible by setting some iptables rule on machine "A", and
setting it to work in forwarding mode. Could this done by setting one
iptables rule
on machine "A"?
What is the proper rule to achieve it?

DS



More information about the Linux-il mailing list