Undo routing table addition

0

I followed the instructions in this question to add an entry to my routing table to solve my collision problem while on a public Wi-Fi network. This is what I ran:

ip route add 10.52.0.14/32 dev tun0

The problem is now I always have to connect to VPN (tun0) to access that IP, even when I am on the university network.

  1. How do I remove this entry? I can't seem to get the syntax of ip route del correct.
  2. Is there a way to persist this and not have to add/remove the entry every time I am on a public Wi-Fi network?
  3. In the add command, what does dev mean?

rink.attendant.6

Posted 2018-10-13T01:16:35.653

Reputation: 699

Answers

1

  1. To remove the route execute ip route del 10.52.0.14
  2. For Debian-based distros, you could add an entry to /etc/network/interfaces (see this question for details)
  3. dev indicates that the parameter that follows (in your case tun0) is the network device to operate on

blihp

Posted 2018-10-13T01:16:35.653

Reputation: 236

Thanks. I'm using Linux Mint (Ubuntu/Debian-based) and I have both the ip and route commands available – rink.attendant.6 – 2018-10-13T01:49:30.520

@rink.attendant.6 I've updated item 2 for Debian – blihp – 2018-10-13T01:57:30.293