I set up an AWS VPN Endpoint last night. This is its DNS name (identifiable info removed):
*.cvpn-endpoint-xxxxxxxxxxxxxxxx.prod.clientvpn.us-xxxxx-1.amazonaws.com
When I create an .ovpn file and install it in network-manager it won't connect. Running:
journalctl -u NetworkManager -b
returns:
RESOLVE: Cannot resolve host address: companyvpn.domainname.com:443 (Name or service not known)
I can run the nslookup command against any public DNS or my internal private DNS servers and it shows me the correct IP addresses. If I use the ping command, it doesn't know what to do with that name.
I also have Network Solutions as a DNS provider so I registered a CNAME. One that has non special characters in it: companyvpn.domainname.com for example. It still won't resolve but again nslookup to the CNAME will pull back the canonical name which is the original *.cvpn-endpoint-xxxxxxxxxxxxxxxx.prod.clientvpn.us-xxxx-1.amazonaws.com and it returns the proper IP address.
I tried pinging companyvpn.domainname.com from a Windows machine. It resolves just fine and showed me the canonical name and it's corresponding IP address. Why won't the resolver in Ubuntu 18.04 do that?
I put in a hostname entry in /etc/hosts for companyvpn.domainname.com and that worked fine but it's because I'm bypassing the resolution of the AWS name that has the special characters.
How can I use the DNS resolver in Ubuntu to resolve my domain name?