I am running a Windows 10 machine for work (required) and so use VirtualBox to get a Fedora 29 machine so I can run code locally before pushing to production. Our github is behind a VPN and we use OpenVPN to do so, so in order to clone our repos I have to follow the following steps:

  1. Run OpenVPN as administrator on the host machine and authenticate
  2. Start VirtualBox and start the Fedora 29 machine
  3. Log in to the Virtual Machine from the host using PuTTy

I can ping the guest from the host and ping the host from the guest. My VirtualBox is set up to have both a Host-only adapter and an NAT adapter. The guest can access the internet entirely.

Now, the guest machine has NetworkManager installed and updated and when it launches it understands that the VPN uses a certain DNS, say x.x.x.x, I know this because of:

$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver general.dns.server.one
nameserver general.dns.server.two
nameserver x.x.x.x

Seems good, but now if I try and access the company website (let's call it internal.company.github.website.net), it fails to resolve the hostname:

$ host internal.company.github.website.net
Host internal.company.github.website.net not found: 3(NXDOMAIN)

$ curl internal.company.github.website.net
curl: (6) Could not resolve host: internal.company.github.website.net

And I know that the DNS in /etc/resolv.conf is correct because:

$ dig internal.company.github.website.net @x.x.x.x

; <<>> DiG 9.11.5-P4-RedHat-9.11.5-4.P4.fc29 <<>> internal.company.github.website.net @x.x.x.x
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58282
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 

The status: NOERROR suggests everything is good and further down I can see it resolved to the correct IP.

I assumed that what was happening was it was trying to use the other two general DNS servers first (from resolv.conf), so I tried to set up a rule in dnsmasq by opening /etc/dnsmasq.conf and adding the rule:


But after a full system restart, the problem persists and I observe no changes.

In a similar vein, I have been trying to add the DNS to the top of resolv.conf but NetworkManager just overwrites it (as it is supposed to) - so no change there. Additionally, I would like to be able to not have to enter the DNS domain directly as I am conscious that it could change (I am not sure, I'm not in charge of our IT) and then I would have to go through this whole process again.

One very strange additional fact about this, is that one of my colleagues is using the same image and we both imported from scratch, and he can connect, but I cannot. Really strange stuff. Also I have completely disabled the Windows Firewall and Defender while I am testing this, so it cannot be that.

Edit: Side-note, I can avoid this problem by using the internal website's actual IP, thus avoiding the DNS lookup, but if this changes (again, I have no idea if if/when it will) then I will have to re-enter it, which seems like a pain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.