From: Stefan Praszalowicz <stefan@avedya.com>
To: netfilter@lists.netfilter.org
Subject: masquerading setting bogus source IP address
Date: 10 Sep 2002 20:04:56 +0200 [thread overview]
Message-ID: <1031681096.5122.12.camel@bilbol> (raw)
[-- Attachment #1: Type: text/plain, Size: 1604 bytes --]
Hi guys,
We're using a Linux 2.4 box as an ASDL gateway for our company office.
Today after rebooting this server we catched a very strange problem...
The gateway itself could access the net, but not the masqueraded
machines.
Running tcpdump, we saw that the gateway was setting the wrong source IP
for the masqueraded connections.
Basically, the packets it sent had src-addr set to 10.0.0.0.
After restarting the pppoe/PPP link to the dsl modem, the source IP
seemed to be incremented. I don't know for sure but at one point the IP
was 10.0.0.17 and next 10.0.0.18.
I solved the problem by adding a SNAT rule before the MASQ one:
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -t nat -I POSTROUTING 1 -j SNAT --to 217.128.104.14
Has anybody seen this before ?
Could it be related to the order in which we start things (like ppp,
firewall scripts, ...)
Thanks anyway
=======================
Some details about the tcpdump results:
** packets originating from the masqueraded hosts, with bogus src ip:
19:09:19.693511 10.0.0.0.33514 > 128.8.10.90.domain: 29756 A?
tracker.ambrosia.net. (38) (DF)
19:09:19.693539 10.0.0.0.33514 > 193.252.19.3.domain: 17779+ A?
login.oscar.aol.com. (37) (DF)
mail.avedya.com. (33) (DF)
19:09:20.693477 10.0.0.0.33514 > 128.63.2.53.domain: 6018 A?
mail.edi-presse.fr. (36) (DF)
** packets originating from the gateway itself, src is OK
19:09:23.985905 217.128.104.14.1049 > 193.252.19.3.domain: 11374+ A?
yahoo.com. (27) (DF)
19:09:24.128264 193.252.19.3.domain > 217.128.104.14.1049: 11374 2/5/5
A 66.218.71.198, A 64.58.79.230 (229) (DF)
[-- Attachment #2: Type: text/html, Size: 2052 bytes --]
next reply other threads:[~2002-09-10 18:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-10 18:04 Stefan Praszalowicz [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-09-11 8:52 masquerading setting bogus source IP address Gert.Vandelaer
[not found] <OF65B32C17.2F140FDE-ONC1256C31.003030A8-C1256C31.0030C91E@medisearch-int.co m>
2002-09-11 11:31 ` Stefan Praszalowicz
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=1031681096.5122.12.camel@bilbol \
--to=stefan@avedya.com \
--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