[FUG-BR] balancear trafego local

Sergio A Lima Jr sergioalimajr em gmail.com
Sábado Outubro 11 12:11:17 BRT 2008


Olá Amigos,

Estou com dois links ligados no meu notebook (ADSL/Wifi), e quero
dividir o trafego em modo dinâmico e também manter uma certa
redundância.

Peguei essas regras do FAQ do openBSD e coloquei no pf, mas não estão
surtindo muito efeito:

ext_if0 = "wlan0"
ext_if1 = "re0"
ext_gw0 = "10.0.0.1"
ext_gw1 = "192.168.0.1"
int_if  = "vlan5"
lan_net = "192.168.5.0/24"
jails_vlan = "{ vlan5 }"

table <firewall> const { self }
table <jails> const { 192.168.5.2, 192.168.5.3, 192.168.5.4 }

thishost = "{ 192.168.0.215 }"
out_services = "{ ftp ftp-data ssh telnet smtp nicname domain www pop3
ntp imap ldap https isakmp xmpp-client 4662 4672 4675 2401 5999 }"
database_services = "{ 523 1433 1434 1525 1527 2041 3050 3306 5432 }"
NoRouteIPs = "{ 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12 }"

nat      on $ext_if0
from !($ext_if0) -> ($ext_if0:0)
nat      on $ext_if1
from !($ext_if1) -> ($ext_if1:0)

block return in  quick on $int_if proto tcp from ! ($ext_if0:0) to
($int_if:network) port ssh
block return in  quick on $int_if  proto tcp from ! ($ext_if1:0) to
($int_if:network) port ssh

pass in on $ext_if0 route-to { ($ext_if0 $ext_gw0), ($ext_if1
$ext_gw1) } round-robin proto tcp  from $thishost to any flags S/SA
modulate state
pass in on $ext_if1 route-to { ($ext_if0 $ext_gw0), ($ext_if1
$ext_gw1) } round-robin proto tcp  from $thishost to any flags S/SA
modulate state
pass in on $ext_if0 route-to { ($ext_if0 $ext_gw0), ($ext_if1
$ext_gw1) } round-robin proto { udp, icmp } from $thishost to any keep
state
pass in on $ext_if1 route-to { ($ext_if0 $ext_gw0), ($ext_if1
$ext_gw1) } round-robin proto { udp, icmp } from $thishost to any keep
state

pass in on $int_if route-to { ($ext_if0 $ext_gw0), ($ext_if1 $ext_gw1) }
round-robin proto tcp           from $lan_net to any flags S/SA modulate
state
pass in on $int_if route-to { ($ext_if0 $ext_gw0), ($ext_if1 $ext_gw1) }
round-robin proto { udp, icmp } from $lan_net to any keep state

Alguma dica?

[]s
Sergio Lima


Mais detalhes sobre a lista de discussão freebsd