From: julien WICQUART <j.wicquart@newtech.fr>
To: netfilter@lists.netfilter.org
Subject: SNAT and DNAT
Date: Tue, 26 Apr 2005 16:18:20 +0200 [thread overview]
Message-ID: <426E4DAC.30900@newtech.fr> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
i have a special situation.
(INTERNET) ===== 210.210.210.210/eth0|firewall|10.0.0.1/eth1 ===== 10.0.0.2|server|
I want to DNAT a port of my firewall on a server inside:
$IPTABLES -t nat -A PREROUTING -i eth0 -d 210.210.210.210 -p tcp --dport 200 -j DNAT
- --to-destination 10.0.0.2:200
but the server inside only accept packets from the IP of the inside interface of the firewall :
10.0.0.1 so i need that the source IP address of the packet sent by someone(x.x.x.x) on the internet
change in 10.0.0.1.
I try the SNAT, the MASQUERADE:
$IPTABLES -t nat -A POSTROUTING -o eth1 -s x.x.x.x -p tcp --dport 20000 -j SNAT --to 10.0.0.1
or
$IPTABLES -t nat -A POSTROUTING -o eth1 -s x.x.x.x -j MASQUERADE
it don't work.
Anyone know how to make this, DNAT and SNAT simultaneously.
Thanks.
- --
- --
Julien
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFCbk2syavHQ2fnGwsRAugxAJ9uDT0Vnsai53XB0o7aMdghpz9ZEACeIkI+
rNvI7zZ8iaJcsNRnMCcjkvI=
=jaWr
-----END PGP SIGNATURE-----
next reply other threads:[~2005-04-26 14:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-26 14:18 julien WICQUART [this message]
2005-04-28 3:30 ` SNAT and DNAT Taylor, Grant
-- strict thread matches above, loose matches on Subject: below --
2003-04-04 8:24 snat and dnat Philippe Dhont (Sea-ro)
2003-04-04 14:18 ` Ralf Spenneberg
2003-04-04 7:59 Philippe Dhont (Sea-ro)
2003-04-04 9:00 ` Ralf Spenneberg
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=426E4DAC.30900@newtech.fr \
--to=j.wicquart@newtech.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