Well just to have a gateway all you need to do is masquerade, that is change the source address to that of your internet connection.  This is done by:
 
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.1.1/24 -j SNAT --to-source 148.245.89.1
 
This is assuming you have a static IP address as your external.  If your external IP address is assigned via DHCP you will need to change the -j SNAT to -j MASQUERADE
 
 
----- Original Message -----
Sent: Friday, May 03, 2002 3:40 PM
Subject: trying to make a gateway.

Hi. I am trying to make a Gateway with 2 ethernet
eth0 148.245.89.1  (internet)
eth1 192.168.1.1  (internal network)
SuSE 7.3 running kernel 2.4.10-64GB
 
does anybody have a few lines to make it with IPTABLES
and if I have to modify the route.conf?
thanks!
 
Carlos Silva

Reply via email to