Block IP

Bill Moran wmoran at
Thu Dec 21 06:38:30 PST 2006

In response to "Suhail Choudhury" <suhailc at>:

> Hi all,
> I'm using IPFW as my firewall.
> What's the easiest way to add an IP such as to block it?

ipfw add deny all from to me

Although you need to take into consideration your existing IPFW rules,
as this will not work if a previous rule allows the connection.

> Also how do I block out IPs after a certain number of invalid login
> attempts to prevent brute forcing?

There are a number of ports that provide this functionality.  I believe
the most popular is called denyhosts.

Bill Moran
Collaborative Fusion Inc.

More information about the freebsd-stable mailing list