FreeBSD 7 Allow IP range to SSH to server – IPF

Edit IPF config

vi /etc/ipf.rules

Hit “i” to enter insert mode and add the following to allow SSH from the 192.168.0.0/24 ip range. Change range if needed.

pass    in     quick on bge0 proto tcp from 192.168.0.0/24 to any port = 22 flags S keep state

Save and exit the file by hitting “Esc” then typing “:wq” followed by enter.

And start IPF with new rules

ipf -Fa -f /etc/ipf.rules

Leave a Reply

Your email address will not be published. Required fields are marked *