firewall:blocking_an_ip_address_using_the_route_command
Differences
This shows you the differences between two versions of the page.
firewall:blocking_an_ip_address_using_the_route_command [2017/09/22 13:54] – created peter | firewall:blocking_an_ip_address_using_the_route_command [2019/11/29 13:14] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Firewall - Blocking an IP address using the route command ====== | ||
- | |||
- | To add an IP to 127.0.0.1: | ||
- | |||
- | <code bash> | ||
- | route add 192.16.1.100 gw 127.0.0.1 lo | ||
- | </ | ||
- | |||
- | |||
- | Also it can be rejected by: | ||
- | |||
- | <code bash> | ||
- | route add -host 192.168.1.100 reject | ||
- | </ | ||
- | |||
- | |||
- | Block entire subnet 192.168.1.0/ | ||
- | |||
- | <code bash> | ||
- | route add -net 192.168.1.0/ | ||
- | </ | ||
- | |||
- | |||
- | To delete this rule: | ||
- | |||
- | <code bash> | ||
- | route del -host 192.168.1.100 reject | ||
- | </ | ||
- | |||
firewall/blocking_an_ip_address_using_the_route_command.1506088493.txt.gz · Last modified: 2020/07/15 09:30 (external edit)