Every time I change networks, DNS cache has the wrong IP. How to fix automatically every time?
My company's employees website can be accessed:
- from the outside world via its IP address 184.108.40.206 or name
- from inside the company's network via its IP address 192.168.1.2 or name
Problem: After commuting from home, accessing the website
employees.corp.com from inside the company often fails.
- When it fails, if I run
ping employees.corp.comit says
64 bytes from w91284.telco.com (220.127.116.11): icmp_seq=1 ttl=255 time=2.08 ms.
- I am the only person with this problem. All other employees browse
employees.corp.comall the time, inside and outside, with no problem. I am also the only one using Linux (Ubuntu 2018.04 installed from scratch but I had the same problem with 2016.04).
I have found two workarounds for when that happens:
- Workaround A: Edit the URL to replace
- Workaround B: Run
sudo service network-manager restart
Both of these workarounds fix the problem momentarily, but none is satisfying as they waste time every day. What would be a permanent solution?
Disabling or shortening DNS cache would make the whole Internet a bit slower to access so I would prefer if it is limited to this particular domain. I am open to completely different solutions too.