From: Mart Frauenlob <mart.frauenlob@chello.at>
To: netfilter@vger.kernel.org
Subject: Re: ipt ROUTE
Date: Wed, 04 Nov 2009 14:56:38 +0100 [thread overview]
Message-ID: <4AF18816.201@chello.at> (raw)
In-Reply-To: <917815.12910.qm@web24108.mail.ird.yahoo.com>
aidan mcgurn wrote:
> Hi,
> (apologies in advance - don't seem to have the option to reply within the same thread so re-sending this)
> thanks for the response.
> I had looked through the archives and did again but i'm fairly new to netfilters iptables and i can't see
> any other way of routing using dst:port via different gateways besides using the ipt ROUTE lib.
>
> That been the case, can u please directme on how to build the ipt_ROUTE kernel object for this or is it a patch thats required?
> As i said i downloaded 1.3.5 iptables code from netfilter and did a make but it only builds the shared objects, no kernel objects which
> i presume i need to install a ipt_ROUTE.ko to get the -j ROUTE option to work?
> alternatively is there any iptables package which includes this?
>
>
Hello,
ipt_ROUTE has been removed, some functionality moved to the TEE target
from xtables-addons (but that's not what you need).
The way to do it, is to use the MARK target to set marks (--set-mark
0xX), like i.e:
iptables -t mangle -A PREROUTING -i eth1 -p tcp --dport 22 -j MARK
--set-mark 0x1
Then use the iproute utility to add routing tables/rules per gateway i.e.
echo X GW1 >> /etc/iproute2/rt_tables
...
ip route add table X <whatever-route>
....
ip rule add from all fwmark 0x1 table X
...
It should not be hard to find valuable examples on the internet. i.e:
http://linux-ip.net/html/adv-multi-internet.html
http://lartc.org/howto/lartc.rpdb.html
Regards
Mart
prev parent reply other threads:[~2009-11-04 13:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-04 12:15 ipt ROUTE aidan mcgurn
2009-11-04 13:56 ` Mart Frauenlob [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=4AF18816.201@chello.at \
--to=mart.frauenlob@chello.at \
--cc=netfilter@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.