All pastes #566616 Raw Edit

Replaced

public text v1 · immutable
·published 2007-06-14 15:04 UTC
rendered paste body
ext_if="ndis0"
int_if="ed0"
internal_net="192.168.0.0/24"
external_addr="193.188.192.15"

#table <foo> { 10.0.0.0/8, !10.1.0.0/16, 192.168.0.0/24, 192.168.1.18 }

#set skip on lo0

scrub in all

# Queueing:
altq on $ext_if bandwidth 192Kb priq queue { internets, webserver }
queue internets priq(default)
queue webserver priority 0 priq

nat on $ext_if from $int_if:network to any -> ($ext_if)
rdr pass on $ext_if proto tcp from any to any port 8080 -> 192.168.0.2 port 8080
rdr pass on $ext_if proto tcp from any to any port 51986 -> 192.168.0.2

pass quick on lo0

block in log all

antispoof quick for $int_if inet

pass  in  on $ext_if proto tcp from any to ($ext_if) port 80 keep state queue webserv
er

#pass  out on $ext_if proto { tcp, udp } all keep state
pass out on $ext_if proto tcp all modulate state flags S/SA
pass out on $ext_if proto { udp, icmp } all keep state

pass in on $int_if all