Skip to content

Adding extra domains to an OpenVPN connection that was added via NetworkManager

Notifications You must be signed in to change notification settings

DenisMedeirosBBD/ExtraDomainsOpenVPN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

ExtraDomainsOpenVPN

Overwriting domains to an OpenVPN connection that was added via NetworkManager

How To

  1. After adding your OpenVPN connection using NetworkManager, a config file will be created in the folder /etc/NetworkManager/system-connections/<connection-name>.
  2. Edit the file above and make sure you have blocks ipv4 and ipv6 with the options dns-search set with all domains you want to overwrite (separated by semicolons). For example, for the domains mydomain.lan and mydomain.zone, it should look like:
[ipv4]
dns-search=mydomain.lan;mydomain.zone
method=auto
never-default=true

[ipv6]
addr-gen-mode=stable-privacy
dns-search=mydomain.lan;mydomain.zone
method=auto
never-default=true
  1. Finally, restart the NetworkManager service and reconnected to your VPN.
systemctl restart NetworkManager

Extra note:

You can also check how the sytemd-resolved looks like by running:

systemd-resolve --status

The output for your connection should be similar to:

Link 43 (tun1)
      Current Scopes: DNS
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 192.168.1.1
                      192.168.1.2
          DNS Domain: mydomain.lan
                      mydomain.zone

About

Adding extra domains to an OpenVPN connection that was added via NetworkManager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published