All of lore.kernel.org
 help / color / mirror / Atom feed
* SNAT and DNAT
@ 2005-04-26 14:18 julien WICQUART
  2005-04-28  3:30 ` Taylor, Grant
  0 siblings, 1 reply; 6+ messages in thread
From: julien WICQUART @ 2005-04-26 14:18 UTC (permalink / raw)
  To: netfilter

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


^ permalink raw reply	[flat|nested] 6+ messages in thread
* snat and dnat
@ 2003-04-04  8:24 Philippe Dhont   (Sea-ro)
  2003-04-04 14:18 ` Ralf Spenneberg
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Dhont   (Sea-ro) @ 2003-04-04  8:24 UTC (permalink / raw)
  To: netfilter

hi,

i had some problems testing the nat thing but now it seems to work without
any rule in snat 
and i can ping from network A to network B in other ranges, but the
ip_forwarding is doing all the work.
is this normal ? 

	--tronstr@csomic--




^ permalink raw reply	[flat|nested] 6+ messages in thread
* snat and dnat
@ 2003-04-04  7:59 Philippe Dhont   (Sea-ro)
  2003-04-04  9:00 ` Ralf Spenneberg
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Dhont   (Sea-ro) @ 2003-04-04  7:59 UTC (permalink / raw)
  To: netfilter

Hi, 

I am a beginner with NAT and maybe you could just help me starting with the
following so i can find the rest myself.
i have an eth0 and eth1 
eth0: 10.51.51.51
eth1: 10.165.254.220
on the eth0 side i have a client 10.51.13.13 who needs to ping to a client
10.165.1.60 
so that's from one side to the other side.
is that SNAT or DNAT ?
and how do i write this in rules ?

thnx!


	--tronstr@axsomic--




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-04-28  3:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-26 14:18 SNAT and DNAT julien WICQUART
2005-04-28  3:30 ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.