From: Patrick McHardy <kaber@trash.net>
To: Yuriy Popyk <fennister@gmail.com>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: Problems with SNAT
Date: Fri, 15 Sep 2006 09:08:08 +0200 [thread overview]
Message-ID: <450A5158.8090709@trash.net> (raw)
In-Reply-To: <8a3f83490609142255r4785dc2fucaa1813179ae67bb@mail.gmail.com>
Yuriy Popyk wrote:
> Hello
>
> I have wrote this mail to netfilter@lists.netfilter.org but nobody
> answered,
> so can i ask you ?
>
>
> We have a lan with ips in private range
> Problem is described with a following pic
>
> ---------- ----------
> | PC2 |-----| R2 |
> ---------- ----------
> |
> |
> ---------- ----------
> | R1 |--------| PC1 |
> ---------- ----------
> |
> ----------
> | ISP |
> ----------
>
> R1 - router 1, linux
> R2 - router 2, ms windows 2000
> PC1 - pc 1, ms windows XP
> PC1 - pc 1, ms windows 2000
>
> when I'm trying to set SNAT on R1 for PC1
> # iptables -t nat -A POSTROUTING -s $pc1 -j SNAT --to-source $ip_to_isp
> it works
>
> but when I'm trying to set SNAT for PC2
> # iptables -t nat -A POSTROUTING -s $pc2 -j SNAT --to-source $ip_to_isp
> it fails
>
> tcpdump -nl -i $ISP_eth
> shows that R1 forwards packets from PC2 to outside world without NATing
> and in the same time packets from PC1 is NATed
Do the packets you're trying to NAT belong to a new connection
that is established by PC2?
Please post a tcpdump showing the problem and the relevant entries
from /proc/net/ip_conntrack.
next prev parent reply other threads:[~2006-09-15 7:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-15 5:55 Problems with SNAT Yuriy Popyk
2006-09-15 7:08 ` Patrick McHardy [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-09-12 9:47 problems " Yuriy Popyk
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=450A5158.8090709@trash.net \
--to=kaber@trash.net \
--cc=fennister@gmail.com \
--cc=netfilter-devel@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 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.