pc-bsd 7.x comes with the pf firewall enabled, and the default ruleset, /etc/pf.conf, is not configured to allow ssh connections from anything but localhost.
In addition, denyhosts is enabled in rc.conf. I believe it may also block ssh connections. It looks innocuous, but I had to disable it in rc.conf to get incoming ssh to work.
I am not a pf guru, but I think something like this will open up ssh from anywhere, assuming your ethernet interface is bfe0:
|
Code:
|
pass in on bfe0 proto tcp from any to (bfe0) port 22 keep state |
or from one host ('foo.bar.com' by name):
|
Code:
|
pass in on bfe0 proto tcp from foo.bar.com to (bfe0) port 22 keep state |
or from a list of hosts
|
Code:
|
pass in on bfe0 proto tcp from { foo.bar.com, ugh.com } to (bfe0) port 22 keep state |
(I am not sure the braces are required)
or from a subnet:
|
Code:
|
pass in on bfe0 proto tcp from 98.23.43.0/24 to (bfe0) port 22 keep state |
If someone has a working configuration for denyhosts that allows a local subnet and a set of external hosts, please post it. I'm also looking for good tutorials, sample configs or other doc for pf and denyhosts. (yes, I saw /usr/share/examples/pf/).
-g