Route P2P on separate link
Hello,
Is there a way to route p2p traffic on a separate ISP connection, just as you would choose a separate connection for http traffic?
I tried all sorts of setups based on:
http://www.braindump.dk/en/wiki/?wikipage=PolicyRouting but with no luck.
Please help :)
(ipp2p is up and running)
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 11 lines · Mihai Vlad
Hello,
Is there a way to route p2p traffic on a separate ISP connection, just as you would choose a separate connection for http traffic?
I tried all sorts of setups based on:
http://www.braindump.dk/en/wiki/?wikipage=PolicyRouting but with no luck.Please help :)
(ipp2p is up and running)
you should MARK your packets in PREROUTING -t mangle, then identify them in iproute2 with fwmark. It's simmilar to this:
table_syn=mytable
$IPT -t mangle -I PREROUTING -i $LAN \
-m multiport -p udp --dports $INET_LOWLAT_UDP_PORTS -j MARK \
--set-mark 1
$IPT -t nat -I POSTROUTING -s $LAN_NET -o $INET_LOWLAT -j MASQUERADE ip rule del fwmark 1 lookup $table_syn &> /dev/null
ip rule add fwmark 1 lookup $table_syn
ip route del table $table_syn &> /dev/null inet_lowlat_gw=192.168.22.22
ip route add default via $inet_lowlat_gw dev $INET_LOWLAT table \ $table_syn
begin:vcard
fn;quoted-printable:Art=C5=ABras =C5=A0lajus n;quoted-printable;quoted-printable:=C5=A0lajus;Art=C5=ABras email;internet:[email protected] tel;cell:+37068958733
x-mozilla-html:FALSE
url:http://h2o.sky.lt/
version:2.1
end:vcard