MY PF.CONF lan_net = "192.168.24.0/24" int_if = "vr0" ext_if1 = "dc0" ext_if2 = "dc1" ext_gw1 = "125.251.99.75" ext_gw2 = "202.146.38.155" nat on $ext_if1 from $lan_net to any -> ($ext_if1) nat on $ext_if2 from $lan_net to any -> ($ext_if2) pass in quick on $int_if from $lan_net to $int_if pass in on $int_if route-to \ { ($ext_if1 $ext_gw1), ($ext_if2 $ext_gw2) } round-robin \ proto tcp from $lan_net to any flags S/SA modulate state pass in on $int_if route-to \ { ($ext_if1 $ext_gw1), ($ext_if2 $ext_gw2) } round-robin \ proto { udp, icmp } from $lan_net to any keep state pass out on $int_if from any to $lan_net pass in quick on $int_if from $lan_net to $int_if pass out on $ext_if1 proto tcp from any to any flags S/SA modulate state pass out on $ext_if1 proto { udp, icmp } from any to any keep state pass out on $ext_if2 proto tcp from any to any flags S/SA modulate state pass out on $ext_if2 proto { udp, icmp } from any to any keep state pass out on $ext_if1 route-to ($ext_if2 $ext_gw2) from $ext_if2 to any pass out on $ext_if2 route-to ($ext_if1 $ext_gw1) from $ext_if1 to any MY NET INTREFACE IP ADD /etc/hostname.dc0 inet 125.251.99.75 255.255.255.240 NONE !route add -mpath default 125.251.99.65 /etc/hostname.dc1 inet 202.146.38.155 255.255.255.128 NONE !route add -mpath default 202.146.38.129 MY SYSCTL # $OpenBSD: sysctl.conf,v 1.42 2007/02/15 20:43:33 reyk Exp $ # # This file contains a list of sysctl options the user wants set at # boot time. See sysctl(3) and sysctl(8) for more information on # the many available variables. # net.inet.ip.forwarding=1 # 1=Permit forwarding (routing) of IPv4 packets net.inet.ip.multipath=1 net.inet.ip.mforwarding=1 # 1=Permit forwarding (routing) of IPv4 multicast packets #net.inet6.ip6.forwarding=1 # 1=Permit forwarding (routing) of IPv6 packets #net.inet6.ip6.mforwarding=1 # 1=Permit forwarding (routing) of IPv6 multicast packets #net.inet6.ip6.accept_rtadv=1 # 1=Permit IPv6 autoconf (forwarding must be 0) #net.inet.tcp.rfc1323=0 # 0=Disable TCP RFC1323 extensions (for if tcp is slow) #net.inet.tcp.rfc3390=0 # 0=Disable RFC3390 for TCP window increasing #net.inet.esp.enable=0 # 0=Disable the ESP IPsec protocol #net.inet.ah.enable=0 # 0=Disable the AH IPsec protocol #net.inet.esp.udpencap=0 # 0=Disable ESP-in-UDP encapsulation #net.inet.ipcomp.enable=1 # 1=Enable the IPCOMP protocol #net.inet.etherip.allow=1 # 1=Enable the Ethernet-over-IP protocol #net.inet.tcp.ecn=1 # 1=Enable the TCP ECN extension #net.inet.carp.preempt=1 # 1=Enable carp(4) preemption #net.inet.carp.log=1 # 1=Enable logging of carp(4) packets #ddb.panic=0 # 0=Do not drop into ddb on a kernel panic #ddb.console=1 # 1=Permit entry of ddb from the console #fs.posix.setuid=0 # 0=Traditional BSD chown() semantics #vm.swapencrypt.enable=0 # 0=Do not encrypt pages that go to swap #vfs.nfs.iothreads=4 # number of nfsio kernel threads #net.inet.ip.mtudisc=0 # 0=disable tcp mtu discovery #kern.usercrypto=0 # 0=disable userland use of /dev/crypto #kern.splassert=2 # 2=enable with verbose error messages machdep.allowaperture=2 # See xf86(4) #machdep.apmwarn=10 # battery % when apm status messages enabled #machdep.apmhalt=1 # 1=powerdown hack, try if halt -p doesn't work #machdep.kbdreset=1 # permit console CTRL-ALT-DEL to do a nice halt #machdep.userldt=1 # allow userland programs to play with ldt, # required by some ports #kern.emul.aout=1 # enable running dynamic OpenBSD a.out bins #kern.emul.bsdos=1 # enable running BSD/OS binaries #kern.emul.freebsd=1 # enable running FreeBSD binaries #kern.emul.ibcs2=1 # enable running iBCS2 binaries #kern.emul.linux=1 # enable running Linux binaries #kern.emul.svr4=1 # enable running SVR4 binaries