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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This turns out to be harder than I thought. The routes I want to delete are the "!" rejected routes, but I can't seem to formulate the right "route del" command to pull it off.

Here is the routing table...

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   *      UH    0      0        0 ppp0   *      UH    0      0        0 ipsec0   -      !H    2      -        0 -     *        U     0      0        0 eth0        *          U     0      0        0 ipsec0        -          !     2      -        0 -
default         *              U     3      0        0 ppp0
default         *              U     4      0        0 ppp0

I have two entries for and These are auto-generated by the little Linux based router I'm using. I can ping the IPSEC tunnels from the shell itself, but traffic from the LAN takes the second route (the rejected "!" or "!H" route) for reasons I simply don't understand.

share|improve this question
Can you be more specific when you say traffic takes the 'second route'? – Zoredache Sep 14 '10 at 18:18
Notice the two table entries for At the router shell, if I ping that side of the tunnel it works. From the LAN-side, traffic goes to the "second" entry and is rejected/drops. – user54259 Sep 14 '10 at 19:52
I also don't understand why the SG560 generates two (2) table entries for "default" and the IPSEC destinations. I'm perplexed. – user54259 Sep 14 '10 at 19:53

The types of the routes with the ! flag are either unreachable or prohibit. route, being an ancient utility from net-tools, does not differentiate between the two. Use iproute2.

The net-tools way to delete these routes would be to use route del on it. However, net-tools provides no way to differentiate between the rejected route and the other one (because the dev argument is optional, though not specifying a device is likely to remove the unreachable route).

iproute2 allows you to do it like this:

ip route del unreachable
ip route del unreachable

It might not be unreachable, but prohibit. Use ip route with no arguments to determine which.

share|improve this answer

I think it's this: route del -net netmask metric 2

I'm not 100% certain. But, I think you've got something else goofy going on since you have 2 default routes.

share|improve this answer
+1 : 2 default routes is always a sign of something being misconfigured (unless they actually point to different gateways and have different metrics). – wolfgangsz Sep 14 '10 at 21:20

with the route -n command you'll obtain

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    0      0        0 eth0         UG    600    0        0 wlan0

sudo route del -net gw netmask dev eth0

you'll get all parameters respectively from above

share|improve this answer

Your Answer


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