LinuxQuestions.org
Visit Jeremy's Blog.
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
 
LinkBack Search this Thread
Old 06-08-2011, 05:47 PM   #1
zeusys
LQ Newbie
 
Registered: Jun 2006
Posts: 25

Rep: Reputation: 0
NAT and NAT Server behind its own NAT(private network)


Hi.
I have to do some networking tests.I'm experimenting some kind of ssh issues and it's only could be solved if I try to establish ssh connection in a Nested NAT network.
I want to implement a NAT on my PC,and somehow my outgoing internet traffic could transmit via this NAT.

First NAT private IP range (192.168.1.X) - Public IP (is a valid IP connected to internet)

Second NAT private IP range (192.168.150.X) - Public IP (one of IPs from 192.168.1.X range)


how I can force my computer which is second NAT,to tranfer its outgoing data through its own NAT?

It's a complicated situation.I hope I could give proper information.
 
Old 06-08-2011, 06:22 PM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,010

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
for outbound traffic, it shouldn't matter how many layers of nat deep you go as long as the gateways are configured properly for each 'layer'

basically, the NAT machines should have two lan cards, an external interface and an internal interface, then the NAT happens between them

Code:
internet
   |
 modem
   |
  nat1 server (gateway = 'modem's internal ip')
   |
   +-nat1 lan (gateway = 'modem's internal ip')
   |
  nat2 server (gateway = 'nat1 server's internal ip')
   |
   +-nat2 lan (gateway = 'nat1 server's internal ip')
the nameserver IP should also be the same as the gateway ip

this is essentially how a DMZ is created
in a DMZ situation, public facing servers (such as web servers) would run in nat zone 1, then the actual company lan would be nat zone 2

the only real issue is when you want to forward INBOUND traffic into a deeper layer of nat, you would forward the necessary port from the modem to nat 1, then from nat 1 to nat 2 and then nat2 forwards the port to the actual machine.

hope this helps

Last edited by frieza; 06-08-2011 at 06:30 PM.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I use NAT and some local hosts without NAT on linux box? tkmbe Linux - Networking 1 08-12-2010 02:38 PM
please help nat router to two private networks jwebby Linux - Newbie 2 02-09-2010 10:12 AM
I configure NAT and use "services ..." to save it but when I reboot there is no nat bruack Linux - Software 4 09-01-2004 02:38 AM
Susefirewall2 Nat Problem / nat 1:1 trubi Linux - Distributions 0 07-20-2004 05:50 AM
What's the difference between Linux-NAT and Sygate-NAT? yuzuohong Linux - Networking 0 08-07-2002 04:07 AM


All times are GMT -5. The time now is 06:48 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