set up NAT (network address translation) on local server

Antonio Olivares olivares14031 at yahoo.com
Wed Nov 19 20:59:34 UTC 2008


Dear all,

Starting new thread to clear up the other one:
Re: Make a DHCP server using Fedora - Help

After going through the steps outlined and the guidance provided by great individuals that participate in this list :)

/* Done now added eth1 to DHCPARGS */ 
[olivares at localhost ~]$ cat /etc/sysconfig/dhcpd
DHCPDARGS=eth1


I need a little bit of help in setting up NAT.  I can use the system-config-firewall or I can try using webmin or from command line, I feel I can achieve the goal.

How should I begin?

I had done this before, but because of other problems between the devices and my errors, it did not work :(

# Forward all packets from eth1 (internal network) to eth0 (the public internet)
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
# Forward packets that are part of existing and related connections from eth0 to eth1
iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
# Enable SNAT functionality on eth0. a.b.c.d are generally the ip of the eth0
iptables -A POSTROUTING -t nat -s 192.168.1.0/24 -o eth0 -j SNAT --to-source a

Thank you for helping,

Regards,

Antonio 


      




More information about the fedora-list mailing list