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...
I have two entries for 192.168.46.79 and 10.1.0.0. 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.
Zoredache113k3131 gold badges233233 silver badges380380 bronze badges
user54259
![Gateway Gateway](/uploads/1/2/5/7/125750160/681615711.png)
4 Answers
In this guide of Different ways of Configuring Static routes in Linux, we’re going to learn on different ways to configure static routes on a Linux system, be it Ubuntu, Kali Linux, CentOS, Fedora, Linux Mint or any other Linux system. If you have a new installation of Linux System, I recommend you read any of below articles depending on the. A gateway is a node or a router that acts as an access point to passes network data from local networks to remote networks. There are many ways to find out your gateway in Linux. Here are some of them from Terminal. You can find default gateway using ip, route and netstat commands in Linux systems. Using route command.
with the
route -n
command you'll obtainsudo route del -net 0.0.0.0 gw 192.168.178.1 netmask 0.0.0.0 dev eth0
you'll get all parameters respectively from above
Philippe GachoudPhilippe Gachoud
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:
It might not be unreachable, but prohibit. Use
Falcon MomotFalcon Momotip route
with no arguments to determine which.22.8k1010 gold badges5252 silver badges7979 bronze badges
I think it's this:
route del -net 10.1.0.0 netmask 255.255.0.0 metric 2
I'm not 100% certain. But, I think you've got something else goofy going on since you have 2 default routes.
baumgartbaumgart
Please see if there is a 'device config file' under /etc/network/interfaces.d/-> I had eht0!! Really, it was eht0 and not eth0 there!
Andreas BrandtsAndreas Brandts
I have problem with my openSUSE 11.3 network. So, I've assigned IP address 192.168.137.2 to it, and another computer (Windows 7) with IP address 192.168.137.1.
On the openSUSE, the gateway is the 192.168.137.1. and the ping result is
And the routing is:
but, what the problem is,
Why does the traceroute not even reach the gateway? Or maybe, this is the networking rule I missed somehow.
Peter Mortensen2,16144 gold badges2222 silver badges2424 bronze badges
LeeLee
migrated from stackoverflow.comAug 26 '11 at 19:20
This question came from our site for professional and enthusiast programmers.
2 Answers
The reason probably is that the Windows 7 internal firewall filters some kinds of packets. Try to disable firewall in Win7 for a while. Use GUI Control Panel or start CLI window as an administrator and issue command
Now repeat traceroute test. In case of positive response from your gateway 192.168.137.1 your next step must be to re-enable Win7 firewall
and change its setting to allow the trace.
If problem persist with disabled W7 firewall you should check local firewall in OpenSUSE PC.Next command flushes all firewall rules and enables totally open communication till next reboot:
netbatnetbat
Maybe the UDP packets are being filtered. Try
tcptraceroute
.jmanjman