All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dirk Schäpsmeyer" <dg1yds@gmx.de>
To: lartc@vger.kernel.org
Subject: [LARTC] advanced routing for 2 internet lines
Date: Wed, 02 Jan 2002 21:56:39 +0000	[thread overview]
Message-ID: <marc-lartc-101000869614620@msgid-missing> (raw)


Hi all,

I have a Linux box with two connections to the internet over two routers and
a private internal network. The linux box does masquerading.



internet +----------+ 172.16.0.1        +-------------------+
  <----  | Router 1 |-------------------|                   |
	   +----------+                   |  172.16.0.2       |
                                        |                   | eth1
192.168.0.99
                                        |  Linux box
|----------------------- ... clients ...
internet +----------+ 172.16.0.3        |                   |
  <----  | Router 2 |-------------------|  routers on eth0  |
	   +----------+                   |                   |
                                        +-------------------+



Now I want it to work in the way I'll describe now:

Basically, every ip-traffic should work over the default-route 172.16.0.1
(router 1). But ip-traffic with e.g. destination port 8123 und 8124
should work over the 2nd router(172.16.0.3).
Certain webservers, like e.g. gmx.com are should ONLY be connected over
router 2.

To do that, I "invented" following but yet not working solution to it:

      ip route add default via 172.16.0.1 dev eth0
	ip route add default via 172.16.0.3 dev eth0 table 100
	ip rule add fwmark 1 table 100
	ip route flush cache

	iptables -A OUTPUT -t mangle -p tcp -s 172.16.0.2 --dport 8123 -j
MARK --set-mark 1
	iptables -A OUTPUT -t mangle -p tcp -s 172.16.0.2 --dport 8124 -j
MARK --set-mark 1

[..not mentioning masquerading rules etc.. ]

The port routing from 8123 and 8124 over the 2nd router works without
problems.

But how do I create the routing for ftp-traffic and the connecting to
certain webservers over the 2nd router?

Thanks a lot!


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

             reply	other threads:[~2002-01-02 21:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-02 21:56 Dirk Schäpsmeyer [this message]
2002-01-03  3:40 ` [LARTC] advanced routing for 2 internet lines Sebastian C K Ip
2002-01-03  9:49 ` AW: " Dirk Schäpsmeyer

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-101000869614620@msgid-missing \
    --to=dg1yds@gmx.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.