[MASOCH-L] Redirecionamento de interfaces

Rubens Marins Schner rubens at brisanet.com.br
Thu May 8 10:29:24 BRT 2014


>
> echo "33 PRINCIPAL" >> /etc/iproute2/rt_tables
> ip rule add from all fwmark 1 table PRINCIPAL
> iptables -t mangle -I PREROUTING -p tcp --sport 25 -j MARK --set-mark 33
> ip route add via 177.220.129.41 dev eth1 table PRINCIPAL
>
> Serial algo mais ou menos assim.
>
>
Um jeito mais simples e que consome menos CPU( por nao usar iptables) seria
usar roteamento pela origem :

echo "33 PRINCIPAL" >> /etc/iproute2/rt_tables
ip rule add from IP-DE-ORIGEM table PRINCIPAL
ip route add default via 177.220.129.41 table PRINCIPAL


More information about the masoch-l mailing list