LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Full NAT with iptables (https://www.linuxquestions.org/questions/linux-networking-3/full-nat-with-iptables-590347/)

fayax 10-08-2007 03:51 PM

Full NAT with iptables
 
I have a fedora box as follow:

eth0 (LAN) 192.168.1.3
eth1 (WAN) 10.12.69.3

I want to enable full NAT with iptables.

Brian1 10-08-2007 05:14 PM

/sbin/iptables -F; iptables -t nat -F; iptables -t mangle -F
/sbin/iptables -t nat -A POSTROUTING -o eth1 -j
echo 1 > /proc/sys/net/ipv4/ip_forward

Run the above commands as root. If it works fine then you can place these commands in /etc/rc.local script at the bottom. Found this from a search here. Just had to change the eth0 to eth1. I myself perfer eth0 to be the wan side and the rest of the interfaces for internal or DMZ use.

There are several other post here like this plus many that are Fedora specific. Might give that a try.

Brian

fayax 10-10-2007 12:26 AM

I don't think it is for Full NAT. In my knowledge Full NAT involves with POSTROUTING and PREROUTING

Brian1 10-10-2007 04:39 PM

Never dealt to much on the prerouting side. If I understand it it would be considered dumb nat or stateless nat. Not sure exactly. Some googling on this does cause confusion.

Brian

rmitev 10-12-2007 06:17 AM

What do you want to do ?

Quote:

The Full NAT option allows masquerading, port forwarding and other forms of full Network Address Port Translation. It is controlled by the `nat' table in iptables: see the man page for iptables(8).


All times are GMT -5. The time now is 07:40 AM.