From: "Frédéric Gonzatti" <fred99@libertysurf.fr>
To: netfilter@lists.netfilter.org
Subject: Re: How to Forward a port (DNAT) ?
Date: Sun, 11 Jul 2004 00:02:18 +0200 [thread overview]
Message-ID: <40F0676A.5000107@libertysurf.fr> (raw)
In-Reply-To: <200407102254.29715.Antony@Soft-Solutions.co.uk>
Antony Stone wrote:
>On Saturday 10 July 2004 10:39 pm, Frédéric Gonzatti wrote:
>
>
>
>>My iptables rules are :
>>##########################################"
>>iptables -F
>>iptables -X
>>
>>echo 1 > /proc/sys/net/ipv4/ip_forward
>>
>>iptables -P INPUT DROP
>>iptables -P FORWARD DROP
>>iptables -P OUTPUT DROP
>>
>>iptables -t filter -A INPUT -i lo -j ACCEPT
>>iptables -t filter -A OUTPUT -o lo -j ACCEPT
>>
>>iptables -t nat -A PREROUTING -p tcp --dport 25 -i eth2 -j DNAT --to
>>192.168.2.151:25
>>
>>#################################################"
>>
>>It's a very simple test. But unfortunately it doesn't work.
>>
>>
>
>You need a FORWARD rule to allow the packets through the firewall after being
>DNATted - you also need to allow the reply packets.
>
>iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
>iptables -A FORWARD -p tcp --dport 25 -d 192.168.2.251 -j ACCEPT
>
>I recommend Oskar Andreasson's tutorial http://iptables-tutorial.frozentux.net
>to you.
>
>Regards,
>
>Antony.
>
>
>
Thanks Antony, I will try this.
Frederic
prev parent reply other threads:[~2004-07-10 22:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-10 21:39 How to Forward a port (DNAT) ? Frédéric Gonzatti
2004-07-10 21:54 ` Antony Stone
2004-07-10 22:02 ` Frédéric Gonzatti [this message]
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=40F0676A.5000107@libertysurf.fr \
--to=fred99@libertysurf.fr \
--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