Howdy List? Following is a modification of the ruleset at http://www.openbsd.org/faq/pf/pools.html .
It works to allow routing of client services service_ports on an internal network onto one external gateway while other services from the internal network default to another path. This works without a default route on the firewall. But if I want to run a client on the firewall itself, I need to have a default route on it. How is it possible to avoid this default route and have clients running on the firewall use the same pf pathways as those running on machines out on the internal network? Is this possible? Dhu int_net = "192.168.1.0/24" int_if = "bge0" ext_if1 = "vr0" ext_if2 = "axe0" ext_gw1 = "" ext_gw2 = "" service_ports = "{ 22 }" set skip on lo scrub in all # nat outgoing connections on each internet interface nat on $ext_if1 from $int_net to any -> ($ext_if1) nat on $ext_if2 from $int_net to any -> ($ext_if2) # default deny block in from any to any block out from any to any # pass all outgoing packets on internal interface pass out on $int_if from any to $int_net # pass in quick any packets destined for the gateway itself pass in quick on $int_if from $int_net to $int_if # outgoing tcp traffic from internal network to ext_gw2 pass in on $int_if route-to { ($ext_if2 $ext_gw2) } proto tcp from $int_net to any flags S/SA modulate state # outgoing tcp ssh traffic from internal network to ext_gw1 pass in on $int_if route-to { ($ext_if1 $ext_gw1) } proto tcp from $int_net to any port $service_ports flags S/SA modulate state # outgoing udp and icmp traffic from internal network to ext_gw2 pass in on $int_if route-to { ($ext_if2 $ext_gw2) } proto { udp, icmp } from $int_net to any keep state # general "pass out" rules for external interfaces 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 # route packets from any IPs on $ext_if1 to $ext_gw1 and the same for # $ext_if2 and $ext_gw2 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