User Tools

Site Tools


ubuntu:firewall:blocking_an_ip_address_using_the_route_command

Ubuntu - Firewall - Blocking an IP address using the route command

To add an IP to 127.0.0.1:

route add 192.16.1.100 gw 127.0.0.1 lo

Also it can be rejected by:

route add -host 192.168.1.100 reject

Block entire subnet 192.168.1.0/24:

route add -net 192.168.1.0/24 gw 127.0.0.1 lo

To delete this rule:

route del -host 192.168.1.100 reject
ubuntu/firewall/blocking_an_ip_address_using_the_route_command.txt · Last modified: 2020/07/15 10:30 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki