On 10/03/2013 08:27 PM, Grant Edwards wrote:
> Let's say you wanted to configure routing of TCP packets based on destination 
> port like in this example:
>
>   http://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.netfilter.html
>
> [which contains a series of 'ip' and 'iptables' commands to get packets
> destined for port 25 to use a specific gateway.]
>
> How do do this the "right" way on a Gentoo system?
>
> Based on reading http://www.gentoo.org/doc/en/home-router-howto.xml, I think 
> I've figured out how to do the iptables part: you enter the 'iptables' 
> commands by hand to get the iptables set up the way you want, then you do 
> this:
>
>   # /etc/init.d/iptables save
>   # rc-update add iptables default
>
> What about the 'ip' commands required to set up the tables, routes, and 
> rules?  Do those go in a startup script somewhere? Does one just edit 
> /etc/iproute2/rt_tables by hand? One would assume route configuration belongs 
> in /etc/conf.d/net -- I've read through the advanced networking stuff in the 
> handbook, but it's not apparent to me where those 'ip' command belong.
>
in /etc/conf.d/net just add the following (adjust as appropriate)

rules_eth1=(
    "from all to 8.8.8.8/24 lookup 101"
)



Reply via email to