From: Marek Kierdelewicz <marek@piasta.pl>
To: "Blaž Bačnik" <bacnik@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: DNAT on another interfaces' IP
Date: Tue, 27 Jan 2009 21:45:54 +0100 [thread overview]
Message-ID: <20090127214554.51d68578@catlap> (raw)
In-Reply-To: <57b62e7d0901270638u75e23a92gf5f0e0c40cf61343@mail.gmail.com>
>Hello,
Hi,
>iptables -t nat -A PREROUTING -d 192.168.0.1 -p tcp --dport 22 -j DNAT
>--to-destination 192.168.2.2
>..
>If I ssh through eth0 (from 192.168.0.3) this gets me to 192.168.2.2
>as expected. But if I ssh through eth1 (from 192.168.1.3) to IP
>192.168.0.1,
>I connect to router, meaning there is no DNAT in effect. Is this the
>intended behaviour? If so, please explain why.
It's not intended behaviour. It should work the way you want unless
some other rules in nat/raw table prevent it. Please send the output of
following commands:
iptables -nvL -t raw
iptables -nvL -t nat
regards,
Marek Kierdelewicz
next prev parent reply other threads:[~2009-01-27 20:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-27 14:38 DNAT on another interfaces' IP Blaž Bačnik
2009-01-27 20:45 ` Marek Kierdelewicz [this message]
2009-01-27 23:51 ` Blaž Bačnik
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=20090127214554.51d68578@catlap \
--to=marek@piasta.pl \
--cc=bacnik@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox