LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-27-2005, 02:41 AM   #1
beno123
LQ Newbie
 
Registered: Jul 2005
Posts: 3

Rep: Reputation: 0
iptables twice nating


Hi,
I would really appreciate some advice on the following. Note that ive had a look at lots of tutorials but when it comes to twin-nating none seem to work for my particular case.
Imagine if you will the following situation

Public address Space

xxxx.xxxx.xxxx.xxxx yyyy.yyyy.yyyy.yyyy
ppp0 ppp0
[network device] [linux border router]
eth1: 172.16.0.4 eth1: 172.16.0.5


DMZ Address space

eth1: 172.16.0.51
[linux dmz / internal router]
eth:0 192.168.1.100

Internal address space

The default route on the on the [linux dmz / internal router] is 172.16.0.4.
In the event that the [network device] fails it would be nice to have traffic come over the [linux border router] without having to make change the default route upon the [linux / internal router].

Is it possible to nat mail for example at the [linux border router] so that the [linux dmz / router] routes packets back through 172.16.0.5 instead of trying to use the default route ?

Here is what Ive tried to no avail upon the [linux border router]

iptables -t nat -A PREROUTING -d yyyy.yyyy.yyyy.yyyy -i ppp0 -p tcp -m tcp --dport 25 -j DNAT --to-destination 172.16.0.51:25

iptables -t nat -A POSTROUTING -s 172.16.0.51/32 -j SNAT -o eth1 --to-source yyyy.yyyy.yyyy.yyyy

iptables -A FORWARD -p tcp -i ppp0 -o eth1 -d 172.16.0.51 -m multiport --dport 25 --sport 1024:65535 -m state --state NEW -j ACCEPT

Any ideas corrections etc would be greatly appreciated
 
  


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
Problem with NATing gpagedar Linux - Networking 5 01-28-2006 08:04 PM
Required IPTables restart after each boot for NATing?? Nickj Linux - Networking 4 10-13-2005 03:16 AM
IPTables Undesired NATing Wraezor Linux - Security 3 07-15-2005 05:09 AM
IP range nating problem szekelyz Linux - Networking 2 09-03-2003 06:29 PM
Nating ... suvajit Linux - Networking 3 05-15-2003 07:09 AM

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

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