Gentoo Archives: gentoo-user

From: Grant Edwards <grant.b.edwards@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Where to put advanced routing configuration?
Date: Thu, 03 Oct 2013 19:28:01
Message-Id: loom.20131003T210545-580@post.gmane.org
1 Let's say you wanted to configure routing of TCP packets based on destination
2 port like in this example:
3
4 http://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.netfilter.html
5
6 [which contains a series of 'ip' and 'iptables' commands to get packets
7 destined for port 25 to use a specific gateway.]
8
9 How do do this the "right" way on a Gentoo system?
10
11 Based on reading http://www.gentoo.org/doc/en/home-router-howto.xml, I think
12 I've figured out how to do the iptables part: you enter the 'iptables'
13 commands by hand to get the iptables set up the way you want, then you do
14 this:
15
16 # /etc/init.d/iptables save
17 # rc-update add iptables default
18
19 What about the 'ip' commands required to set up the tables, routes, and
20 rules? Do those go in a startup script somewhere? Does one just edit
21 /etc/iproute2/rt_tables by hand? One would assume route configuration belongs
22 in /etc/conf.d/net -- I've read through the advanced networking stuff in the
23 handbook, but it's not apparent to me where those 'ip' command belong.
24
25 --
26 Grant

Replies

Subject Author
Re: [gentoo-user] Where to put advanced routing configuration? Kerin Millar <kerframil@×××××××××××.uk>
Re: [gentoo-user] Where to put advanced routing configuration? thegeezer <thegeezer@×××××××××.net>
[gentoo-user] Re: Where to put advanced routing configuration? Grant Edwards <grant.b.edwards@×××××.com>