LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 04-14-2011, 07:53 AM   #1
walidch
LQ Newbie
 
Registered: Mar 2009
Posts: 8

Rep: Reputation: 0
Help with setting up iptables for Symmetric NAT


Hello everyone,

I am having difficulties setting up Symmetric NAT through iptables and I hope you can help me with this issue.

First things first:
"A symmetric NAT is one where all requests from the same internal IP address and port, to a specific destination IP address and port, are mapped to the same external IP address and port. If the same host sends a packet with the same source address and port, but to a different destination, a different mapping is used. Furthermore, only the external host that receives a packet can send a UDP packet back to the internal host."

Need:
I am working on a SIP application and SIP apps face a problem with NATed networks.
STUN is a solution to such a problem and my SIP application has an embedded STUN client functionality.

Scenario and Technical Details:


192.168.0.200
+-----------------+
| ClientA - My IP |
+-----------------+
|
|GW:
| eth0 eth1 (example public IP address)
| 192.168.0.1 | 123.123.123.123
+-------------|-------------+
| NAT1 |
+-------------|-------------+
|
|
|
stun.1und1.de |
+---------------------------+
| STUN Server |
+---------------------------+

I am using WinSTUN, which requires a STUN Server address (such as the one I specified above) to return my type of NAT.

What I need to achieve is Symmetric NAT through iptables, on the GW server, only on my IP address (192.168.0.200). I don't want it to affect the whole network.

I am running CentOS release 5.4 (Final), and iptables v1.4.10

Thanks a lot everyone,
 
Old 04-15-2011, 08:59 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,790

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
Quote:
Originally Posted by walidch View Post

Scenario and Technical Details:


192.168.0.200
+-----------------+
| ClientA - My IP |
+-----------------+
|
|GW:
| eth0 eth1 (example public IP address)
| 192.168.0.1 | 123.123.123.123
+-------------|-------------+
| NAT1 |
+-------------|-------------+
|
|
|
stun.1und1.de |
+---------------------------+
| STUN Server |
+---------------------------+

I am using WinSTUN, which requires a STUN Server address (such as the one I specified above) to return my type of NAT.


I am running CentOS release 5.4 (Final), and iptables v1.4.10

Thanks a lot everyone,
Can you tell us your environment a little more in detail I mean if you have the image of your network thats great upload it to thread if not the just mention the devices that will play role in this with their IP addresses.

Also when you say "What I need to achieve is Symmetric NAT through iptables, on the GW server, only on my IP address (192.168.0.200). I don't want it to affect the whole network."

what does that mean?

Are you trying to say you want Symmetric NAT to communicate with GW server via iptables?

Just for your ip 192.168.0.200?

Does that mean you want your IP i.e. 192.168.0.200 should communicate to Symmetric NAT get an external address and as per the rules in IP tables get forwarded to gateway?
 
  


Reply

Tags
nat, sip


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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, do I need to NAT? zazagor Linux - Networking 6 02-28-2011 02:28 AM
iptables on two interfaces: need help setting up a nat/firewall Mardok Linux - Networking 2 05-29-2010 12:45 PM
iptables: can't initialize iptables table `NAT' linuxgentoo Linux - Kernel 3 01-17-2010 11:15 AM
IPTABLES : build NAT using IPTABLES joseph Linux - Networking 4 04-23-2004 06:08 AM
Setting Up Iptables for NAT Chijtska Linux - Networking 1 02-13-2002 07:06 PM


All times are GMT -5. The time now is 01:54 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration