0

I ran this command to "block" an IP address:

route add -host 123.123.123.123 reject

It works. I can see it in the list of routes:

root@mypc:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway        0.0.0.0         UG    0      0        0 enp3s0
123.123.123.123 -               255.255.255.255 !H    0      -        0 -

Cool. How do I delete the route?

I tried:

root@mypc:~# route del 123.123.123.123 gw - netmask 255.255.255.255 metric 0

But it gave this (error?):

-: Unknown host

How do I delete a route?

1 Answer 1

1

Run the original command but with delete instead of add:

route delete -host 123.123.123.123 reject

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .