From: Patrick McHardy <kaber@trash.net>
To: Guido Trentalancia <guido@trentalancia.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Port forwarding with iptables on tunnel interface
Date: Thu, 11 Feb 2010 19:57:43 +0100 [thread overview]
Message-ID: <4B745327.9020806@trash.net> (raw)
In-Reply-To: <1265912094.2985.44.camel@tesla.lan>
Guido Trentalancia wrote:
> 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 ?
Try logging the packets coming out of the tunnel to see whats wrong.
next prev parent reply other threads:[~2010-02-11 18:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-11 18:14 Port forwarding with iptables on tunnel interface Guido Trentalancia
2010-02-11 18:57 ` Patrick McHardy [this message]
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
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=4B745327.9020806@trash.net \
--to=kaber@trash.net \
--cc=guido@trentalancia.com \
--cc=netfilter@vger.kernel.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 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.