Re: Problem with router connected to two ISPs (connection marking?)

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

 



former03 | Baltasar Cevc írta:

On 09.08.2006, at 14:35, Marek Zachara wrote:


Maybe these lines will help you... :) But if not.... :D

$IPT -t nat -A POSTROUTING -j SNAT -p tcp --dport www -d $WWW
--to-source $MY_IP
$IPT -t nat -A POSTROUTING -j SNAT -p tcp --dport www -d $WWW
--to-source $MY_IP

Sorry... That was a misstype and also a missunderstood ...

Try these lines:

$IPT -t mangle -A PREROUTING -j CONNMARK -p tcp --dport www -d $WWW1 --set-mark 1 $IPT -t mangle -A PREROUTING -j CONNMARK -p tcp --dport www -d $WWW2 --set-mark 2

$IPT -t nat -A PREROUTING -j DNAT -i eth0 -m connmark --mark 1 --to-destination $INT_WWW $IPT -t nat -A PREROUTING -j DNAT -i eth0 -m connmark --mark 2 --to-destination $INT_WWW

$IPT -t nat -A POSTROUTING -j SNAT -o eth0 -m connmark --mark 1 --to-source $EXT_WWW1 $IPT -t nat -A POSTROUTING -j SNAT -o eth0 -m connmark --mark 2 --to-source $EXT_WWW2





[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