All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramin Dousti <ramin@cannon.eng.us.uu.net>
To: Thhoep <thhoep@gmx.de>
Cc: netfilter@lists.netfilter.org
Subject: Re: Problem using fwmarks as routing key: "MASQUERADE: Route sent us somewhere else."
Date: Fri, 23 Jan 2004 11:06:03 -0500	[thread overview]
Message-ID: <20040123160603.GA7516@cannon.eng.us.uu.net> (raw)
In-Reply-To: <001c01c3e043$93583cd0$1684188d@Kiste>

I think you would get a better response at lartc.org mailing list.
Hope you solve your problem soon.

Ramin

On Wed, Jan 21, 2004 at 06:25:22PM +0100, Thhoep wrote:

> hi,
> 
> my aim: to divide 100 hosts upon 6 masqueraded adsl connections to the
> internet using a linux router runnig a debian woody.
> 
> the problem: really strange behaviour of the routing/masquerading combo,
> that changes with every tried kernel version. (described below)
> 
> presumption: some version mismatch or a bug in the kernel routing code,
> which needs a bugfix that till now is unknown to me
> 
> my config:
> 
> masquerading is activated in "/etc/ppp/ip-up.d" using
> -----------
> iptables -t nat -A POSTROUTING -o $PPP_IFACE -j MASQUERADE
> -----------
> 
> routing policy is defined upon reboot:
> -----------
> echo 1 > /proc/sys/net/ipv4/ip_forward
> 
> ip route flush table main
> ip route add 192.168.1.0/24 dev eth4 table main
> 
> # routing policies for adsl
> for (( i=1 ; $i<7; i++ )) ; do
>     ip route flush table dsl$i
>     ip route add 192.168.1.0/24 dev eth4 table dsl$i
>     ip rule add fwmark $i table dsl$i
> done
> 
> # dividing users
> iptables -t mangle -A PREROUTING -i eth4 -s 192.168.1.10 -j MARK --set-mark
> 1
> iptables -t mangle -A PREROUTING -i eth4 -s 192.168.1.11 -j MARK --set-mark
> 1
> #....
> iptables -t mangle -A PREROUTING -i eth4 -s 192.168.1.17 -j MARK --set-mark
> 2
> #....  and so on
> -----------
> 
> external default routes are added to the dsl? tables in "/etc/ppp/ip-up.d"
> using
> -----------
> ip route add $PPP_REMOTE dev $PPP_IFACE src $PPP_LOCAL table $PPP_IPPARAM
> ip route add default via $PPP_REMOTE dev $PPP_IFACE table $PPP_IPPARAM
> ip route flush cache
> -----------
> 
> versions:
> kernels tried: 2.4.20 - 2.6.1
> iptables 1.2.9
> iproute iproute2-ss010824
> pppd version 2.4.1
> patches: none
> 
> PROBLEM DESCRIPTION:
> 
> if i do a ping from an internal host to an external host i can see with
> tcpdump, that the ping request found its way out of ppp?, a reply is coming
> in, but isn't sent out of the internal interface eth4. if i use pure
> counting netfilter rules for debugging i see, that the replies get lost
> between PREROUTING and FORWARD, so i assume they get lost while routing. a
> "route -C -n" shows a route to the external host, but no route back from the
> external to the internal. in "/var/log/kern.log" are the only
> networking-related messages:
> -----------
> kernel: request_module: failed /sbin/modprobe -- net-pf-10. error = 256
> kernel: MASQUERADE: Route sent us somewhere else.
> -----------
> net-pf-10 seems to be an alias for some ipv6 module. i don't use ipv6 and
> therefor don't have this module. so i ignored that error. that maquerading
> message could be related to my problem. formerly with an older but very
> similar configuration (i think just the iptables was linked to an older
> kernel, but version was the same) i got another message:
> -----------
> kernel: MASQUERADE: No route: Rusty's brain broke!
> -----------
> i can't interpret any of both.
> 
> in addition (this seems to be important): in an older configuration i didnt
> use fwmarks to select the routing tables but the inbuilt "from <ip>"
> directive of the "ip"-tool like this:
> -----------
> ip rule add from 192.168.1.10 table dsl1
> -----------
> and in this configuration the router WAS WORKING absolutely nice and exactly
> as expected. my problem only appears when i try to use fwmarks as routing
> key. (the corresponding kernal feature is enabled).
> 
> please help me! i tried very hard and very long to solve this problem (over
> weeks) and if i cant solve it i have to try it with openbsd or something
> like that, out of pure desperation..
> 
> with best regards,
> thomas hoeppler
> 


  reply	other threads:[~2004-01-23 16:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-21 17:25 Problem using fwmarks as routing key: "MASQUERADE: Route sent us somewhere else." Thhoep
2004-01-23 16:06 ` Ramin Dousti [this message]
2004-01-23 19:13   ` Rodrigo Severo
2004-01-27  1:51 ` Harald Welte

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=20040123160603.GA7516@cannon.eng.us.uu.net \
    --to=ramin@cannon.eng.us.uu.net \
    --cc=netfilter@lists.netfilter.org \
    --cc=thhoep@gmx.de \
    /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.