Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-27-2005, 02:41 AM   #1
LQ Newbie
Registered: Jul 2005
Posts: 3

Rep: Reputation: 0
iptables twice nating

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: eth1:

DMZ Address space

[linux dmz / internal router]

Internal address space

The default route on the on the [linux dmz / internal router] is
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 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

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

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

Any ideas corrections etc would be greatly appreciated


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
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 > Forums > Linux Forums > Linux - Networking

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

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