Re: Routing HTTP Through Another Link

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

 



>Greetings!

Hello Diogo!

>I'd like to route my HTTP traffic (ports 80 and 443) through a separate
>link, but I'm not sure if I must use the ROUTE target or even how to

You can use policy routing with MARK:

iptables -t nat -A PREROUTING -i LAN_INTERFACE -m multiport --dport
80,443 -j MARK --set-mark 0x10
iptables -t nat -A POSTROUTING -o WWW_ONLY_LINK -j MASQUERADE

ip ru add fwmark 0x10 table 100 prio 100
ip ro add default via WWW_LINK_GW table 100

assumption: WWW_LINK_GW (gateway address of www-onlu link) is always
the same

Be sure to place MASQ rule before SNAT rule you've written about or
specify an output interface in SNAT rule.

You can find "ip" in "iproute2" package in any distro I think.

Best regards,
Marek
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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