From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: port forwarding not working
Date: Thu, 15 Apr 2004 15:53:36 +0100 [thread overview]
Message-ID: <200404151553.36634.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <33770.212.251.31.59.1082039282.squirrel@newmail.gnet.gr>
On Thursday 15 April 2004 3:28 pm, Alexander Economou wrote:
> If i understood well , you have a linux firewall with a dmz ip and you
> want to redirect traffic from a real ip to lan ip of your network.If i am
> correct then you should do :
>
> iptables -t nat -F
> iptables -t nat -A POSTROUTING -o dmzinterface -j MASQUERADE
I disagree with this rule. It will make all connections to servers in the
DMZ network appear to come from the firewall, which will destroy any useful
logging on the services which are running.
> iptables -t nat -A PREROUTING -p tcp -d dmzip --dport 6181 -j DNAT --to
> lanip:6181
> iptables -t nat -A PREROUTING -p tcp -d dmzip --dport 6182 -j DNAT --to
> lanip:6182
> etc etc
It's important to remember that in addition to the PREROUTING rules to do the
address translation, you need FORWARDign rules to allow the now-translated
packets through the firewall. It was the FORWARDing rules which were the
problem in Nick's script.
Regards,
Antony.
--
Wanted: telepath. You know where to apply.
Please reply to the list;
please don't CC me.
next prev parent reply other threads:[~2004-04-15 14:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-15 13:57 port forwarding not working Nick Vazirianis
2004-04-15 14:07 ` Ray Leach
2004-04-15 14:28 ` Alexander Economou
2004-04-15 14:53 ` Antony Stone [this message]
2004-04-15 15:58 ` Cedric Blancher
2004-04-15 14:16 ` Antony Stone
-- strict thread matches above, loose matches on Subject: below --
2004-04-15 15:08 aksingh
2007-04-29 3:15 Port " Neil Aggarwal
2007-04-29 7:10 Port forwarding not working (nfcan: to exclusive) (nfcan: to exclusive) Jim Laurino
2007-04-29 13:06 ` Neil Aggarwal
2007-04-29 14:39 ` Port forwarding not working Jim Laurino
2007-04-30 2:11 ` Neil Aggarwal
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=200404151553.36634.Antony@Soft-Solutions.co.uk \
--to=antony@soft-solutions.co.uk \
--cc=netfilter@lists.netfilter.org \
/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