Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

To block a single IP address I'm using the following:

/sbin/route add -host

Is it possible to block an range of the IP addresses using the route?

I have tried the tips found on google like:

/sbin/route add
/sbin/route add -net -blackhole

But none of them seem to work.

share|improve this question
Have you tried route add -net ? –  user158505 Feb 11 '13 at 15:27
Why are you not using one of the three built-in firewalls?? –  Chris S Feb 11 '13 at 15:47

1 Answer 1

Blackholing an IP:

/sbin/route add -blackhole

Blackholing a range:

/sbin/route add -net -blackhole

To make it permanent edit /etc/rc.conf:

static_routes=”d1 d2″
route_d1=”-net -blackhole”
route_d2=”-net -blackhole”
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.