ipfw and ssh example

Steve Bertrand iaccounts at northnetworks.ca
Wed Dec 3 19:14:12 PST 2003


On Wed, 2003-12-03 at 21:55, Chris wrote:
> Hiya folks.
> 
> 	Please show me an example that I might use if I want to allow only one IP 
> address into a box via ssh, yet deny all others.

The following will allow ssh from 192.168.1.3 to your box in through the
'rl0' interface, and deny all other ssh traffic to the box.

# ipfw add 10 allow tcp from 192.168.1.3 to me 22 in via rl0 keep-state
# ipfw add 11 deny tcp from any to me 22

Hope this helps.

Steve

-- 

Steve Bertrand
President/CTO,
Northumberland Network Services

t: 905.352.2688
w: www.northnetworks.ca



More information about the freebsd-ipfw mailing list