From: <goblin@pentex.pl>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] two providers.
Date: Thu, 16 Aug 2007 15:25:39 +0000 [thread overview]
Message-ID: <8cd844dfd487463b1d7e5a8238b15c35@localhost> (raw)
In-Reply-To: <136729277.20070816154811@yandex.ru>
> So, there's a trouble.
>
> I have debian etch linux. 2.6.18-4 kernel.
>
> On this computer i have three interfaces: eth0 - my lan, eth1, eth2 -
> providers.
>
> By default all internet traffic routed through eth2. But i NEED to
> route mail and icq (tcp110, tcp25, tcp5190) through eth1. How can i do
> that?
A while ago ive used a similar configuration, what ive done was:
- create additionall routing table
add all regular entries to it with changed default gateway for the second provider like:
ip route add xxx.xxx.xxx.xxx via yyy.yyy.yyy.yyy table 2
...
ip route add default via IP_OF_2ND_GATEWAY table 2
- mark desired traffic with iptables
iptables -I FORWARD -s LAN_NET/MASK -p tcp --dport XXX -j MARK --set-mark 2
- use ip rules to direct marked packets via alternative routing table
ip rule add fwmark 2 table 2
- and maby add additionall rule to make all packages originating at eth1 ip to go via table 2
ip rule add from ETH1_IP table 2
should be more or less something like this, though i dont recall if syntax was exactly like ive wrote above.
big dissadvantage of this solution is utilisation of marks, that might be used for another purpose.
--
Radek 'Goblin' Pieczonka
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next prev parent reply other threads:[~2007-08-16 15:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-16 11:48 [LARTC] two providers Виталий Цховребов
2007-08-16 15:25 ` goblin [this message]
2007-08-17 4:57 ` Indunil Jayasooriya
2007-08-18 4:50 ` Mikhail
2007-08-18 6:23 ` Виталий Цховребов
-- strict thread matches above, loose matches on Subject: below --
2007-08-21 8:07 mangal regmi
2007-08-21 8:54 ` Indunil Jayasooriya
2007-08-21 10:43 ` mangal regmi
2007-08-21 11:23 ` Indunil Jayasooriya
2007-08-21 11:31 ` Salim S I
2007-08-22 4:16 ` Indunil Jayasooriya
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=8cd844dfd487463b1d7e5a8238b15c35@localhost \
--to=goblin@pentex.pl \
--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.