Re: Iproute2 and fwmark usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> i just tried over an hour to bring a tunnel up on one of my other servers,
> so i can simulate routing behaviour with it, but just wasted my time with
> trying to fix a broken ppp installation on it. dont have the patience and
> gotten way too tired to do that right now. so i give you the configuration
> of my testing setup and if you would like to reproduce it i would
appreciate
> it.
>
> iptables -t mangle -A PREROUTING -i eth4 -s 192.168.0.22 -j
MARK --set-mark 1
>

damn, forgot the masquerading rule here:
iptables -t nat -A POSTROUTING -o ppp4 -j MASQUERADE


> ip route add 192.168.0.0/24 dev eth4 table test
>
> ip rule add fwmark 1 table test
> OR
> ip rule add from 192.168.0.22 table test
>
> (these ones done in the ppp ip-up script)
>
> ip route add <remote ip> dev <ppp iface> src <local ip>
> ip route add default via <remote ip> dev <ppp iface>
>
> (dont use a default route in the main table to the same ppp iface, so you
> feel a difference when the routing rules apply or not)
>
>
> thats all i think.
>
>



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux