LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-30-2011, 09:16 PM   #1
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 215

Rep: Reputation: 30
Nat


Hi
I have a network of global ip xxx.yyy.141.0/24 and many local network running behind global ip proxy 192.168.0.0/16.

I want to add NAT

My machine xxx.yyy.141.36 on eth0 192.168.20.0/24 on eth1 .
I have another server xxx.yyy.141.64 on eth0 & 192.168.10.0/24

From my machine in the NAT rules of iptables
- A POSTROUTING -s 192.168.20.0/24 -d !192.168.0.0/16 -o eth0 -j MASQUERADE
Works fine my from local LAN 192.168.20.0/24
OR
- A POSTROUTING -s 192.168.20.0/25 -d !xxx.yyy.141.0/24 -o eth0 -j MASQUERADE
Also works ok. But I cannot make them work together

How can I go to both xxx.yyy.141.0/24 & 192.168.0.0/16 without NAT from my local LAN 192.168.20.0/24
Sanjib Gupta

Last edited by sanjibgupta; 05-30-2011 at 09:17 PM.
 
Old 05-31-2011, 05:18 PM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
if you want to do it without nat then you'll need to put in routes for the various networks at the routers, essentially if you look at your network as a tree any non-leaf node will need routes in them to the leaf nodes under it and a default route going to it's parent node
 
Old 06-01-2011, 11:59 AM   #3
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 215

Original Poster
Rep: Reputation: 30
Routing networks is not my problem. I am albe to reach all my network but it gets nat to the global IP which I don't want when I try to reach the global ip(xxx.yyy.141.0/24)
I want to move both within local ip range(192.168.0.0/16) & (xxx.yyy.141.0/24) with my loca ip as many servers only allow local IPs


Sanjib Gupta
 
  


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



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
Difference between NAT and NO NAT plisken Linux - Networking 1 01-10-2008 11:53 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

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

All times are GMT -5. The time now is 04:59 AM.

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