Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Which command can be used to configure a router to reject the address for example network using the route command

share|improve this question
What kind of router? Is it running Ubuntu? Are you running iptables yourself on it? –  gertvdijk Sep 18 '12 at 21:30
yeah it's running ubuntu and also yeah i run iptables on –  user61928 Sep 19 '12 at 5:12

2 Answers 2

up vote 1 down vote accepted

this would be just the right answer:

route add -net netmask reject
share|improve this answer

you can use the firewall to do so

sudo ufw deny from <ip address>
share|improve this answer
thanks man but what i need is to do it using route command –  user61928 Sep 20 '12 at 14:30

Your Answer


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