Ubuntu – Unable to resolve host error after a VPN session

Problem: Ubuntu unable to resolve hosts after a disrupted VPN session.

Reason: The DNS server not reset to normal from that of the VPN network.

Fix: On terminal, do –

  1. sudo vi /etc/resolv.conf
  2. Remove the “dns domain” and “dns server” lines from this file.
  3. Save and close the file.
  4. Restart browser or the app which needs to connect to internet.
Sreekumar Kj
Sreekumar (KJ) has been a hobby programmer from school days. Codemarvels is his personal blog from the year 2010, where he writes about technology, philosophy, society and a bit about physics. He now runs a conversational AI company - DheeYantra - focusing his efforts to help businesses improve operational efficiency using digital employees powered by AI.