From: netfilter@serverguy.net
To: netfilter@lists.netfilter.org
Subject: Problem with SNAT and same port number
Date: Mon, 23 Feb 2004 13:30:59 +1000 [thread overview]
Message-ID: <200402231330.59035.netfilter@serverguy.net> (raw)
Hi,
I am wanting to change the source address of outgoing packets that have a src
port of 53.
I have tried
/sbin/iptables -A POSTROUTING -p tcp -t nat -o bond0 --sport 53 -j SNAT
--to-source 192.168.0.1:53
This doesnt work, it seems to be that you cant SNAT to a port the same as the
original src port because
/sbin/iptables -A POSTROUTING -p tcp -t nat -o bond0 --sport 53 -j SNAT
--to-source 192.168.0.1
/sbin/iptables -A POSTROUTING -p tcp -t nat -o bond0 --sport 53 -j SNAT
--to-source 192.168.0.1:52
both works, but obviously not the same results as I wanted because the src
port is also changed.
Is there any other way to do what I am wanting??
TIA
reply other threads:[~2004-02-23 3:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200402231330.59035.netfilter@serverguy.net \
--to=netfilter@serverguy.net \
--cc=netfilter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox