All of lore.kernel.org
 help / color / mirror / Atom feed
* Port forwarding with iptables on tunnel interface
@ 2010-02-11 18:14 Guido Trentalancia
  2010-02-11 18:57 ` Patrick McHardy
  0 siblings, 1 reply; 13+ messages in thread
From: Guido Trentalancia @ 2010-02-11 18:14 UTC (permalink / raw)
  To: netfilter

Hello !

I have the following problem. I need to forward/redirect all connections
to port 25 (smtp) from one host (192.168.3.64) to another host on the
same network (192.168.3.69).

I am using the following iptables rules:

-A PREROUTING -p tcp --dport 25 -j DNAT --to-destination 192.168.3.69
-A POSTROUTING -p tcp -d 192.168.1.65 --dport 25 -j MASQUERADE

and I have also tried the following alternative rules:

-A PREROUTING -p tcp --dport 25 -j DNAT --to-destination 192.168.3.69
-A POSTROUTING -p tcp -d 192.168.1.65 --dport 25 -j SNAT --to-source
192.168.3.64

The connections come from an IP-IP tunnel and they are allowed by the
following iptables rules:

-A INPUT -p 4 -i eth0 -j ACCEPT
-A OUTPUT -p 4 -o eth0 -j ACCEPT

It used to work until a few days ago. But now it only works from within
the LAN and not from the tunnel. I have not changed any iptables rules
and I have only upgraded the system to the latest kernel (2.6.32.8).

The version of iptables that I am using is 1.4.3.1.

Any idea on how to get it back working ?

Regards,

Guido


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

end of thread, other threads:[~2010-02-12 22:27 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-11 18:14 Port forwarding with iptables on tunnel interface Guido Trentalancia
2010-02-11 18:57 ` Patrick McHardy
2010-02-11 19:20   ` Guido Trentalancia
2010-02-12  5:29     ` Patrick McHardy
2010-02-12 13:28       ` Guido Trentalancia
2010-02-12 14:41         ` Patrick McHardy
2010-02-12 15:21           ` Guido Trentalancia
2010-02-12 17:30           ` Guido Trentalancia
2010-02-12 19:01             ` Mike Wright
2010-02-12 19:23               ` Guido Trentalancia
2010-02-12 19:56                 ` Mike Wright
2010-02-12 22:27                   ` Guido Trentalancia
2010-02-11 20:05   ` Guido Trentalancia

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.