Internet connection sharing between two boxes

George Magklaras georgios at biotek.uio.no
Fri Jan 29 14:47:21 UTC 2010


Why bridging? You can NAT/Masquerade from the "private" interface (say 
eth1) to the "public" interface (say eth0). To do this, all you need is 
to bring the two interfaces up with valid IPs (the eth1 will be a non 
routable one (i.e. 192.168.0/24)) and connect your machines like that:


Internet---><---(eth0)--->Machine_provider<---(eth1)--->Machine_on_private_lan

and then edit the /etc/sysconfig/iptables file and enter a line like this:

-A POSTROUTING -s IP_of_Machine_on_private_lan -o eth0 -j MASQUERADE

restart IPTABLES and you should be done

(IPTABLES -t nat -L should confirm your NAT/MASQUERADE)

I hope this helps.

GM

-- 
--
George Magklaras BSc Hons MPhil
RHCE:805008309135525

Senior Computer Systems Engineer/UNIX-Linux Systems Administrator
EMBnet Technical Management Board
The Biotechnology Centre of Oslo,
University of Oslo
http://folk.uio.no/georgios

Tel: +47-22840535

--





cliff here wrote:
> Hi,
> 
> I had a method way back I think it was in RHEL 4, on how to bridge two
> interfaces together.
> 
> Basically what I want to do would be described as windows internet
> connection sharing ICS (sorry for the windows example)
> 
> I basically want to take 1 machine with two NIC's  and connect a  2nd to it
> and have access to the network either on private subnet or with a public IP,
> which ever is easiest.
> 




More information about the redhat-list mailing list