From: Chad Eldridge <celdridge@corp.web.com>
To: netfilter@vger.kernel.org
Subject: SNAT
Date: Tue, 09 Oct 2007 14:47:35 -0400 [thread overview]
Message-ID: <470BCCC7.2070007@corp.web.com> (raw)
I have a situation where I have packets coming into a server (we'll call
it RTR) and getting routed to other servers depending on the ip address
the packet is coming from. This part works great. The problem I am
having is when the server (call it Responder) answers back to the
original client (not going back through RTR), the client sees the
traffic coming from an address it did not originally try to open a
connection to and therefore rejects the packets and the connection is
never established. I thought I could fix this by using SNAT to change
the source ip on Responder.
iptables -t nat -A POSTROUTING -p tcp -m tcp --sport $PORT -j SNAT --to
$RTR-IP
This however, seems to do nothing. The Responder still sends replies to
the client, they make it to the client and show up as coming from the ip
address of Responder.
It was suggested to me that I would need to turn off rp_filter (echo 0 >
/proc/sys/net/ipv4/conf/all/rp_filter; echo 0 >
/proc/sys/net/ipv4/conf/eth0/rp_filter) since the ip address I am trying
to change the source to does not actually exist on the server. I tried
that but it did not seem to help. Further more it was suggested that I
could setup the $RTR-IP on a loopback and arptables it off and then it
should work. This did not work either. If it is because iptables is
trying to prevent spoofing I'm guessing it is stopping it because it's
trying to send it out an interface that does not have the ip on it. Then
again, all of this guessing could be wrong.
Is this even possible with iptables? If so, how can I accomplish it?
Everything I have seen that seems like it should work has so far failed.
iptables v1.2.8
Redhat ES3
(Final box will probably be running ES4)
Thanks,
--
Chad Eldridge
Security | Web.com
celdridge@corp.web.com
404.260.2580
next reply other threads:[~2007-10-09 18:47 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-09 18:47 Chad Eldridge [this message]
2007-10-09 19:47 ` SNAT Grant Taylor
-- strict thread matches above, loose matches on Subject: below --
2012-02-22 2:04 SNAT cc
2012-02-22 7:47 ` SNAT SamLT
2005-05-02 15:32 snat Marco Berizzi
2005-05-02 15:53 ` snat Jason Opperisano
2005-05-03 13:58 ` snat Marco Berizzi
2005-05-02 16:07 ` snat Taylor, Grant
2005-05-02 16:14 ` snat Jason Opperisano
2005-05-02 2:52 ` snat Ken Hilliard
2005-05-02 18:04 ` snat Charlie Brady
2005-05-02 18:06 ` snat Jason Opperisano
2005-05-02 3:14 ` snat Ken Hilliard
2004-07-09 3:57 SNAT Payal Rathod
2004-07-09 4:58 ` SNAT John A. Sullivan III
2003-07-08 0:21 SNAT David Busby
2003-04-25 17:45 SNAT Andy Wood
2003-04-03 18:34 SNAT Daniel Chemko
2003-04-06 10:52 ` SNAT Rio Martin.
2003-04-06 21:49 ` SNAT Daniel Chemko
[not found] <20030403102302.5858.91445.Mailman@kashyyyk>
2003-04-03 10:29 ` SNAT Rio Martin.
2002-11-13 11:21 SNAT Rob Sterenborg
2002-11-13 13:26 ` SNAT Breno Cardoso Perucchi
2002-11-13 13:48 ` SNAT Rob Sterenborg
2002-11-13 16:33 ` SNAT Luis Fernando Barrera
2002-11-12 18:38 MS Messenger Aaron Clausen
2002-11-12 19:53 ` SNAT Breno Cardoso Perucchi
2002-11-12 21:01 ` SNAT Rob Sterenborg
2002-11-12 21:29 ` SNAT Antony Stone
2002-11-12 21:47 ` SNAT Luis Fernando Barrera
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=470BCCC7.2070007@corp.web.com \
--to=celdridge@corp.web.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.