How to delete ip route by URL?
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
1
down vote
favorite
After running a (probably broken) openvpn script, I have an IP route table where one entry is a URL:
# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 10.0.0.1 0.0.0.0 UG 0 0 0 wlp58s0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp58s0
google.com 10.0.0.1 255.255.255.255 UGH 0 0 0 wlp58s0
How can I delete this last row? The regular way throws an error:
# ip route del google.com
Error: any valid prefix is expected rather than "google.com".
I'm on gentoo linux, if that matters.
linux networking iproute
add a comment |Â
up vote
1
down vote
favorite
After running a (probably broken) openvpn script, I have an IP route table where one entry is a URL:
# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 10.0.0.1 0.0.0.0 UG 0 0 0 wlp58s0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp58s0
google.com 10.0.0.1 255.255.255.255 UGH 0 0 0 wlp58s0
How can I delete this last row? The regular way throws an error:
# ip route del google.com
Error: any valid prefix is expected rather than "google.com".
I'm on gentoo linux, if that matters.
linux networking iproute
6
Adding the -n flag to netstat will remove any confusion.
â Jeff Schaller
Jul 28 at 16:58
1
Oh, so simple, thanks! If you post it as an answer, I'll accept it.
â Felix
Jul 28 at 17:15
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
After running a (probably broken) openvpn script, I have an IP route table where one entry is a URL:
# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 10.0.0.1 0.0.0.0 UG 0 0 0 wlp58s0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp58s0
google.com 10.0.0.1 255.255.255.255 UGH 0 0 0 wlp58s0
How can I delete this last row? The regular way throws an error:
# ip route del google.com
Error: any valid prefix is expected rather than "google.com".
I'm on gentoo linux, if that matters.
linux networking iproute
After running a (probably broken) openvpn script, I have an IP route table where one entry is a URL:
# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 10.0.0.1 0.0.0.0 UG 0 0 0 wlp58s0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp58s0
google.com 10.0.0.1 255.255.255.255 UGH 0 0 0 wlp58s0
How can I delete this last row? The regular way throws an error:
# ip route del google.com
Error: any valid prefix is expected rather than "google.com".
I'm on gentoo linux, if that matters.
linux networking iproute
asked Jul 28 at 16:41
Felix
1083
1083
6
Adding the -n flag to netstat will remove any confusion.
â Jeff Schaller
Jul 28 at 16:58
1
Oh, so simple, thanks! If you post it as an answer, I'll accept it.
â Felix
Jul 28 at 17:15
add a comment |Â
6
Adding the -n flag to netstat will remove any confusion.
â Jeff Schaller
Jul 28 at 16:58
1
Oh, so simple, thanks! If you post it as an answer, I'll accept it.
â Felix
Jul 28 at 17:15
6
6
Adding the -n flag to netstat will remove any confusion.
â Jeff Schaller
Jul 28 at 16:58
Adding the -n flag to netstat will remove any confusion.
â Jeff Schaller
Jul 28 at 16:58
1
1
Oh, so simple, thanks! If you post it as an answer, I'll accept it.
â Felix
Jul 28 at 17:15
Oh, so simple, thanks! If you post it as an answer, I'll accept it.
â Felix
Jul 28 at 17:15
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
5
down vote
accepted
The entry google.com
is not a URL; it's a domain name, or possibly a host name. (It could be part of a URL, though.)
If you use netstat -rn
you will get IP addresses instead of names in that first column. From there you can delete the route - again by reference to its network and subnet addressing.
netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default server.roaima 0.0.0.0 UG 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
google.com 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.2.2 0.0.0.0 UG 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
216.58.198.174 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
route delete -host 216.58.198.174
You can also do this with the newer ip route
, which lists routes only with IP addresses. Use ip route del
to delete the unwanted entry.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
The entry google.com
is not a URL; it's a domain name, or possibly a host name. (It could be part of a URL, though.)
If you use netstat -rn
you will get IP addresses instead of names in that first column. From there you can delete the route - again by reference to its network and subnet addressing.
netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default server.roaima 0.0.0.0 UG 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
google.com 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.2.2 0.0.0.0 UG 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
216.58.198.174 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
route delete -host 216.58.198.174
You can also do this with the newer ip route
, which lists routes only with IP addresses. Use ip route del
to delete the unwanted entry.
add a comment |Â
up vote
5
down vote
accepted
The entry google.com
is not a URL; it's a domain name, or possibly a host name. (It could be part of a URL, though.)
If you use netstat -rn
you will get IP addresses instead of names in that first column. From there you can delete the route - again by reference to its network and subnet addressing.
netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default server.roaima 0.0.0.0 UG 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
google.com 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.2.2 0.0.0.0 UG 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
216.58.198.174 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
route delete -host 216.58.198.174
You can also do this with the newer ip route
, which lists routes only with IP addresses. Use ip route del
to delete the unwanted entry.
add a comment |Â
up vote
5
down vote
accepted
up vote
5
down vote
accepted
The entry google.com
is not a URL; it's a domain name, or possibly a host name. (It could be part of a URL, though.)
If you use netstat -rn
you will get IP addresses instead of names in that first column. From there you can delete the route - again by reference to its network and subnet addressing.
netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default server.roaima 0.0.0.0 UG 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
google.com 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.2.2 0.0.0.0 UG 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
216.58.198.174 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
route delete -host 216.58.198.174
You can also do this with the newer ip route
, which lists routes only with IP addresses. Use ip route del
to delete the unwanted entry.
The entry google.com
is not a URL; it's a domain name, or possibly a host name. (It could be part of a URL, though.)
If you use netstat -rn
you will get IP addresses instead of names in that first column. From there you can delete the route - again by reference to its network and subnet addressing.
netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default server.roaima 0.0.0.0 UG 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
google.com 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.2.2 0.0.0.0 UG 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
216.58.198.174 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
route delete -host 216.58.198.174
You can also do this with the newer ip route
, which lists routes only with IP addresses. Use ip route del
to delete the unwanted entry.
answered Jul 28 at 17:19
roaima
39.2k544105
39.2k544105
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f459064%2fhow-to-delete-ip-route-by-url%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
6
Adding the -n flag to netstat will remove any confusion.
â Jeff Schaller
Jul 28 at 16:58
1
Oh, so simple, thanks! If you post it as an answer, I'll accept it.
â Felix
Jul 28 at 17:15