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 |