Code:
root@Jefferson:~/firewall.d # uname -a
FreeBSD Jefferson.libertyroof.biz 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
Code:
root@Jefferson:~/firewall.d # cat pf.conf
############ Global Options #######################
int_if="fxp0"
ext_if="bge0"
set block-policy return
set loginterface $ext_if
set skip on lo
tcp_svc="22"
icmp_types="echoreq"
localnet="192.168.1.0/24"
table <us.blocks> persist file "/root/firewall.d/us.blocks"
table <aliens> persist file "/root/firewall.d/aliens.blocks"
table <bruteforce> persist
################ End Global Options ################
########### Traffic Normalization ##################
scrub in on $ext_if all fragment reassemble
scrub out on $ext_if all fragment reassemble
####################################################
####### NAT RULE GOES BEFORE ALL FILTERS ! ! #######
nat on $ext_if from $localnet to any -> ($ext_if)
####################################################
################## Filters #########################
block in all
block drop quick on $ext_if from $localnet to <aliens>
pass out quick on $ext_if from $localnet to any keep state
block in quick on $ext_if from <aliens> to $localnet
block drop in quick on $ext_if from ! <us.blocks> to $localnet
pass in log quick on $ext_if proto tcp from <us.blocks> to { self } port 22 \
flags S/SA keep state \
(max-src-conn 5, max-src-conn-rate 3/9, \
overload <bruteforce> flush global)
pass out quick on $int_if from $localnet to any keep state
pass in quick on $int_if from $localnet to any keep state
####################################################
################### <END OF FILE> ##################
####################################################
The way I had it before the initial 'block in all' was commented out because the pass to port 22 line wasn't working properly. I finally got that to work (shout out to this forum), so I dropped the comment off the first rule and everything was working fine until I tried to ssh from this machine to any of the other machines behind it.
Before I made the change, ssh went through immediately. Now the ssh process hangs for about 6 seconds before finally presenting me with a login prompt.
I'm at a loss. Can anyone else see what the problem is?