I'm using pf on FreeBSD 9. sshd is up and listening on loopback only (127.0.0.1).
Trying to use redirect rule to allow network hosts to connect via ssh.
set block-policy drop
set skip on lo0
scrub in
no rdr on lo0 all
rdr on fxp0 inet proto tcp from any to (fxp0) port = ssh -> 127.0.0.1
block drop in log quick on ! lo inet from 127.0.0.0/8 to any
block drop log on fxp0 all
pass in quick on fxp0 inet proto tcp from any to 127.0.0.1 port ssh
pass out quick on fxp0 all keep state
This does not work for some reason and I see no related messages in pflog.
Tried also with rdr pass
with same result.
I see this status from pfctl -ss
:
all tcp 127.0.0.1:22 (192.168.0.40:22) <- 192.168.0.252:65105 CLOSED:SYN_SENT
When I turn logging for rdr, I see this:
rdr in on fxp0: 192.168.0.252.65105 > 127.0.0.1.22: Flags [S], seq 1927917349, win 65535, options [mss 1460,nop,wscale 3,sackOK,TS[|tcp]>
What is wrong with my setup?
How to get more log output?