A workaround that works for me is to remove my vpn domain from /etc/resolv.conf. The last line of this file looks as follows after a successful VPN connection:
search Home myvpndomain
where the last term is the domain of my vpn (vpn.bla.com). The workaround is to remove it and leave:
search Home
then restart the network-manager service and the VPN reconnects.
Otherwise I have to restart the computer to be able to connect to the VPN after a successful connection. I mean: after a computer restart, VPN always connects, but if I disconnect I cannot reconnect to the VPN unless I restart the computer or do the workaround.
I have a big confusion on how /etc/resolv.conf is managed nowadays in Ubuntu. I have at least three different system processes generating a resolv.conf.
My actual /etc/resolv.conf is a symbolic link to this last one. At some point I tried to have only network-manager manage /etc/resolv.conf. Everything works fine, but when I connect to VPN it can't resolve any DNS outside of the private network.
The resolv.conf generated by systemd-resolved has the same problem as the one generated by resolvconf, when the VPN reconnects the VPN domain is not removed from the "search" line.
I'm experiencing this same issue.
A workaround that works for me is to remove my vpn domain from /etc/resolv.conf. The last line of this file looks as follows after a successful VPN connection:
search Home myvpndomain
where the last term is the domain of my vpn (vpn.bla.com). The workaround is to remove it and leave:
search Home
then restart the network-manager service and the VPN reconnects.
Otherwise I have to restart the computer to be able to connect to the VPN after a successful connection. I mean: after a computer restart, VPN always connects, but if I disconnect I cannot reconnect to the VPN unless I restart the computer or do the workaround.
I have a big confusion on how /etc/resolv.conf is managed nowadays in Ubuntu. I have at least three different system processes generating a resolv.conf.
systemd-resolved: resolve/ resolv. conf
/run/systemd/
network-manager: ager/resolv. conf
/run/NetworkMan
and resolvconf: /resolv. conf
/run/resolvconf
My actual /etc/resolv.conf is a symbolic link to this last one. At some point I tried to have only network-manager manage /etc/resolv.conf. Everything works fine, but when I connect to VPN it can't resolve any DNS outside of the private network.
The resolv.conf generated by systemd-resolved has the same problem as the one generated by resolvconf, when the VPN reconnects the VPN domain is not removed from the "search" line.