LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-08-2007, 03:51 PM   #1
fayax
LQ Newbie
 
Registered: Nov 2005
Posts: 15

Rep: Reputation: 0
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.
 
Old 10-08-2007, 05:14 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
/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
 
Old 10-10-2007, 12:26 AM   #3
fayax
LQ Newbie
 
Registered: Nov 2005
Posts: 15

Original Poster
Rep: Reputation: 0
I don't think it is for Full NAT. In my knowledge Full NAT involves with POSTROUTING and PREROUTING
 
Old 10-10-2007, 04:39 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
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
 
Old 10-12-2007, 06:17 AM   #5
rmitev
LQ Newbie
 
Registered: Sep 2007
Posts: 27

Rep: Reputation: 15
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).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IPTABLES and NAT metallica1973 Linux - Security 7 09-07-2007 09:08 PM
iptables nat kernelvn Linux - Networking 5 05-03-2005 11:39 AM
IPTABLES : build NAT using IPTABLES joseph Linux - Networking 4 04-23-2004 05:08 AM
iptables and NAT arrruken Linux - Networking 8 10-03-2003 04:17 AM
IPtables +NAT daromer Linux - Networking 1 01-07-2002 11:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration