From: "Kris Op de Beeck" <kris.op.de.beeck@newtec.eu>
To: "Patrick McHardy" <kaber@trash.net>
Cc: "Ulrik De Bie" <ulrik.debie@newtec.eu>, <netdev@vger.kernel.org>,
"Netfilter Development Mailinglist"
<netfilter-devel@vger.kernel.org>
Subject: Re: DNAT sporadically doesn't replace destination IP address
Date: Thu, 29 May 2008 12:12:23 +0200 [thread overview]
Message-ID: <483E9DB9.B932.00FE.0@newtec.eu> (raw)
In-Reply-To: <483C1E3F.4030802@trash.net>
>>> On 27/05/2008 at 16:44, in message <483C1E3F.4030802@trash.net>, Patrick
McHardy <kaber@trash.net> wrote:
>> print "iptables -t mangle -A VLAN$vlan -j MARK --set-mark $vlan\n";
>> print "iptables -t mangle -A OUTPUT -o eth2.$vlan -j VLAN$vlan\n";
>> print "ip ro add table $vlan default dev eth2.$vlan\n";
>> print "ip ru add fwmark $vlan table $vlan\n";
>
> This looks like a chicken-and-egg problem. You mark packets based
> on the output device, but use the mark to direct them to the output
> device.
>
> I guess if you use the source IP for routing table selection it
> will work. Not sure why it works at all currently.
We have found the problem why the IP addresses were not pingable anymore with Ubuntu 8.04. It seems that with that release the rp_filter is default on. If we put this off the modems are pingable again. In the mean time I don't have my setup fully operational anymore. I've got 1 modem connected for the others I'm sending wget's which timeout since no modem is connected. I nolonger see any tracing with dmesg, I will need to try again with the full setup to be sure but that will take some time.
When changing the configuration like you suggested, you get something like this for every modem:
vconfig add eth1 129
ifconfig eth1.129 192.168.1.31
route del -net 192.168.1.0/24
route add -host 10.9.9.30 eth1.129
iptables -t nat -A OUTPUT -o eth1.129 -j DNAT --to 192.168.1.1
ip ro add table 129 default dev eth1.129
ip rule add from 192.168.1.31 table 129
ip ro fl ca
Then it works also, and rp_filter can be on. This also still needs to be tested with the full setup.
I think the problem is solved. Thanks for that in guiding me.
If I should still encounter any problems I will let you know.
** Still wondering why there wasn't any problem with the old kernel ... maybe I just was lucky ...
Newtec will be present at the following exhibitions :
CommunicAsia, 17-20 June, Singapore, Booth 6B2-01
*** e-mail confidentiality footer ***
This message and any attachments thereto are confidential. They may also
be privileged or otherwise protected by work product immunity or other
legal rules. If you have received it by mistake, please let us know by
e-mail reply and delete it from your system; you may not copy this
message or disclose its contents to anyone.
E-mail transmission cannot be guaranteed to be secure or error free as
information could be intercepted, corrupted, lost, destroyed, arrive
late or incomplete, or contain viruses. The sender therefore is in no
way liable for any errors or omissions in the content of this message,
which may arise as a result of e-mail transmission. If verification is
required, please request a hard copy.
next prev parent reply other threads:[~2008-05-29 10:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 14:33 DNAT sporadically doesn't replace destination IP address Kris Op de Beeck
2008-05-22 14:57 ` Patrick McHardy
2008-05-22 15:22 ` Kris Op de Beeck
2008-05-22 15:28 ` Patrick McHardy
2008-05-22 15:34 ` Kris Op de Beeck
2008-05-22 15:36 ` Patrick McHardy
2008-05-22 16:29 ` Patrick McHardy
2008-05-22 17:45 ` Kris Op de Beeck
2008-05-23 14:16 ` Kris Op de Beeck
2008-05-26 14:21 ` Patrick McHardy
2008-05-27 14:27 ` Kris Op de Beeck
2008-05-27 14:44 ` Patrick McHardy
2008-05-29 10:12 ` Kris Op de Beeck [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-05-26 12:11 Ulrik De Bie
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=483E9DB9.B932.00FE.0@newtec.eu \
--to=kris.op.de.beeck@newtec.eu \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=ulrik.debie@newtec.eu \
/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;
as well as URLs for NNTP newsgroup(s).