Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Rokas <rokasz@centras.lt>
To: lartc@vger.kernel.org
Subject: [LARTC] Policy routing with IPTABLES MARK
Date: Tue, 28 Oct 2003 22:37:48 +0000	[thread overview]
Message-ID: <marc-lartc-106738078728361@msgid-missing> (raw)


Hello,

I have a LINUX server with two internet connections available. One
connection is the default route. I want all the traffic to go over
this default route, but HTTP traffic to go over line #2. I think the
configuration should be similar to source policy routing. I have tried
source policy routing when I had to route one local computer via
second ISP link. But now, as I understand, I need to mark the packets
with destination port 80 and route them via the second ISP link. I
have tried to put marking rules:

echo 200 isp2 >> /etc/iproute2/rt_tables

iptables -t mangle -A PREROUTING -i eth1 -p tcp --dport 80 -j MARK
--set-mark 1

ip rule add fwmark 1 table isp2

ip route add default via 192.168.2.113 dev eth1 table isp2

But it doesn't work for me. The #2 line is connected to the same
Ethernet card as LAN, perhaps this is the bug ??? But if I use a rule:

ip rule from 192.168.2.24 table isp2

, it works OK: local computer 192.168.2.24 comes out to the internet
via ISP2 line. But I can't reach the same situation with IPTABLES/MARK
IP RULE FWMARK tools... :(

I would be very grateful if you gave me as much information as
possible about my problem.

   Rokas Zakarevicius


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

             reply	other threads:[~2003-10-28 22:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-28 22:37 Rokas [this message]
2003-10-30 10:06 ` [LARTC] Policy routing with IPTABLES MARK Rokas
2003-10-31  9:20 ` [LARTC] Policy routing with IPTABLES MARK (please help me) Rokas

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=marc-lartc-106738078728361@msgid-missing \
    --to=rokasz@centras.lt \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox