From: Greg Cope <gregcope@gmail.com>
To: Jason Opperisano <opie@817west.com>, netfilter@lists.netfilter.org
Subject: Re: How to Get a DMZ hosts's trafic routed via a particular IP address on a firewall?
Date: Fri, 6 May 2005 15:36:04 +0100 [thread overview]
Message-ID: <c0e9781f05050607362e5d644e@mail.gmail.com> (raw)
In-Reply-To: <20050505213458.GA24884@bender.817west.com>
On 5/5/05, Jason Opperisano <opie@817west.com> wrote:
> <--snip crazy routing stuff-->
>
> sounds like you want 1-to-1 NAT for the mail server, which takes 2 NAT
> rules (one for connections initiated *to* the mailserver, and one for
> connections initiated *from* the mailserver):
>
> iptables -t nat -A PREROUTING -i eth0 -d 217.154.55.250 \
> -j DNAT --to-destination $MAILSRV_PRIV_IP
That I have working fine.
>
> iptables -t nat -A POSTROUTING -o eth0 -s $MAILSRV_PRIV_IP \
> -j SNAT --to-source 217.154.55.250
Ah - tried this:
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.254.2 -p tcp --dport
25 -j SNAT --to-source 217.154.55.250
Or variants there off.
No Joy...
I could scream......
Anyone any ideas
Greg
mail.e-dba.net = 192.168.254.3 the DMZ / private address
$ iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- anywhere mail.e-dba.net tcp
dpt:smtp to:192.168.254.2
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 192.168.0.0/16 anywhere
SNAT tcp -- mail.e-dba.net anywhere to:217.154.55.250
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
>
> sounds like you already have the 1st rule in place. make sure the 2nd
> rule comes *before* any outbound SNAT/MASQ rule that is less specific.
>
> -j
next prev parent reply other threads:[~2005-05-06 14:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-05 16:31 How to Get a DMZ hosts's trafic routed via a particular IP address on a firewall? Greg Cope
2005-05-05 21:34 ` Jason Opperisano
2005-05-06 14:36 ` Greg Cope [this message]
2005-05-06 14:40 ` Jason Opperisano
2005-05-06 14:57 ` How to Get a DMZ hosts's trafic routed via a particular IP address on a firewall - NOW solved Greg Cope
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c0e9781f05050607362e5d644e@mail.gmail.com \
--to=gregcope@gmail.com \
--cc=netfilter@lists.netfilter.org \
--cc=opie@817west.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox