From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?QXJ0xatyYXMgxaBsYWp1cw==?= Date: Mon, 31 May 2004 05:42:51 +0000 Subject: Re: [LARTC] Route P2P on separate link Message-Id: <40BAC5DB.2020301@h2o.pieva.net> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------020809090809010402050109" List-Id: References: <20040530003837.C0ABA4029@outpost.ds9a.nl> In-Reply-To: <20040530003837.C0ABA4029@outpost.ds9a.nl> To: lartc@vger.kernel.org This is a multi-part message in MIME format. --------------020809090809010402050109 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Mihai Vlad wrote: > 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 --------------020809090809010402050109 Content-Type: text/x-vcard; charset=utf-8; name="x11.vcf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="x11.vcf" YmVnaW46dmNhcmQNCmZuO3F1b3RlZC1wcmludGFibGU6QXJ0PUM1PUFCcmFzID1DNT1BMGxh anVzDQpuO3F1b3RlZC1wcmludGFibGU7cXVvdGVkLXByaW50YWJsZTo9QzU9QTBsYWp1cztB cnQ9QzU9QUJyYXMNCmVtYWlsO2ludGVybmV0OngxMUBoMm8ucGlldmEubmV0DQp0ZWw7Y2Vs bDorMzcwNjg5NTg3MzMNCngtbW96aWxsYS1odG1sOkZBTFNFDQp1cmw6aHR0cDovL2gyby5z a3kubHQvDQp2ZXJzaW9uOjIuMQ0KZW5kOnZjYXJkDQoNCg== --------------020809090809010402050109-- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/