All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Schulz <msc@antzsystem.de>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Dual ISP routing and NAT problem
Date: Thu, 09 Mar 2006 12:00:39 +0000	[thread overview]
Message-ID: <200603091300.39469.msc@antzsystem.de> (raw)
In-Reply-To: <44071C23.7040206@chello.at>

Am Donnerstag, 2. März 2006 17:24 schrieb Mart Frauenlob:
> Hello newsgroup,
>
> I hope somebody with more routing experience then me can help me with
> the problem I have.
>
> The setup is as described below. A dual internet provider routing,
> multiple local area networks, and a dmz network with one public and
> one private ip range.
> I followed the instructions at lartc.org, and so far everything is
> working. The default route is via 'PROV_STATIC', only packets comming
> from LAN 192.168.111.0/24 are routed via 'PROV_DSL'.
> Now if I want to do network address translation via iptables for
> certain traffic coming into the dsl interface ppp0,
> packets never reach their destination.
> DNAT into DMZ or any of the LANs over the eth0 interface works as
> expected. So for example applying a DNAT rule like:
> 'iptables -t nat -A PREROUTING -i ppp0 -d 217.92.8.242 -p tcp --dport
> 80 -j DNAT --to-destination 62.155.170.254'
> fails.
>
> Same for NAT attempts into the LANs 192.168.112.0/24 and
> 192.168.113.0/24. While DNAT into LAN 192.168.111.0/24 works
> perfectly.
>
> So I think the problem is that traffic from the DMZ and those two
> LANs have the ip rules applied to end up in the the table
> 'PROV_STATIC'. Which usually is what I want, but not in this case,
> where I want port or protocol specific traffic to be routed
> differntly.
> Is there a way to 'override' the default routing behaviour for i.e.
> http traffic?

yes, mark the traffic with iptables and route them with a higher prio 
routing rule differently. 
for example:
iptables -t mangle -I PREROUTING ... -j MARK --set-mark 0x01

#insert rule for all marked packets to look at table 100 for routing 
entries.
ip rule add prio $PRIO fwmark 0x01 table 100
#insert your routing entries for alle marked packets into table 100
ip route add <...> table 100
...

$IP must changed according your setup.
the $PRIO must be changed to take at the right place. If i understand 
your problem correctly the prio must be below 32759 and $IP=all. But 
i'm not sure if i understand it right.

-- 
Markus Schulz

modprobe windows
modprobe: This module will TAINT the kernel
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

      parent reply	other threads:[~2006-03-09 12:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-02 16:24 [LARTC] Dual ISP routing and NAT problem Mart Frauenlob
2006-03-06 17:23 ` Mart Frauenlob
2006-03-07 13:14 ` Nathan Rodrigues Levy
2006-03-07 15:15 ` Aleksander
2006-03-09 12:00 ` Markus Schulz [this message]

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=200603091300.39469.msc@antzsystem.de \
    --to=msc@antzsystem.de \
    --cc=lartc@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.