Ads not blocked from Ubuntu VM after install. Perhaps router configuration?

From below log entries:

Nov 23 20:27:01 dnsmasq[64905]: query[A] from
Nov 23 20:27:01 dnsmasq[64905]: /etc/pihole/gravity.list is

I can make up that Pi-hole is working fine as "" is in one of the lists and resolving to Pi-hole (if is your VM):

pi@noads:~ $ pihole -q
::: /etc/pihole/ (1 results)
::: /etc/pihole/list.preEventHorizon (1 results)

On client, try browse to below link to see if the Pi-hole block page comes up:

Thank you @deHakkelaar. I did as you suggested.

  • From within the VM (using Firefox), i get a message: "Access to the following site has been blocked:"
  • From my host PC (using Chrome & Firefox), I get "’s server DNS address could not be found."
  • From my android tablet, connected via wi-fi, I get the same message as from my PC: "’s server DNS address could not be found."

Is this the expected behavior? I would think that I would get the same response, whether i was in the VM or not, so long as I was on the same network.

As for me seeing ads on and, I suppose it's because the source of those ads aren't in the lists used by pi-hole by default?

You should see same results, the block page, as on the VM for all your clients.

In some cases yes.
Some sites publish ads from their own site (dont use 3rd party ad distributor).
Those ads are impossible to block for Pi-hole using just DNS.

From the Netgear screenshot, it seems its lacking particular DHCP server options to get Pi-hole running properly.
It does not allow you to set DNS servers for the clients via its DHCP service.
Best option is to disable the DHCP server on the Netgear box entirely and as replacement, use Pi-hole's DHCP service instead:

I tried what you suggested, and my phone and tablet are no longer able to connect by wifi. Clearly more configuration is needed.
My phone and tablet are both stuck on "obtaining IP addresses", even after rebooting both devices.

For the moment, shutting off pi-hole and returning router to default settings until I can get pi-hole to work on my hardware without losing wifi connections.

Phones and pads are a bit harder to diagnose.
First focus on getting Pi-hole to work with a regular client PC that has the necessary tools to diagnose.
On the "host PC", configured to use Pi-hole, what is displayed when you run below two in a CMD prompt:

nslookup pi.hole

ipconfig /all

For the latter one, I am only interested in the "DHCP Server" & "DNS Servers" bits.

It looks like Pi-hole might not be listening on the correct interfaces. Check to make sure that you configured Pi-hole to use the IP of the interface which the other devices can reach it on (run pihole -r to reconfigure this). So long as your network IPs are not accessible by the internet directly, it shouldn't matter much whether you hide them or not. It could help debugging. Or, you could disclose them privately: How do I debug my Pi-hole installation?

@deHakkelaar -- This is what i see when running each command in the command prompt.

nslookup pi.hole

Server: ubuntu
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.

ipconfig /all

Ethernet adapter Ethernet:

DHCP Server . . . . . . . . . . . :
DNS Servers . . . . . . . . . . . :

Ethernet adapter VirtualBox Host-Only Network:

DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1

Ethernet adapter VMware Network Adapter VMnet1:

DHCP Server . . . . . . . . . . . :
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1

Ethernet adapter VMware Network Adapter VMnet8:

DHCP Server . . . . . . . . . . . :
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1

Hopefully this is useful.

@Mcat12 --

When I reconfigred pi-hole and allowed it to detect the IP, it came up with This is all I have available on my LAN Setup page. As my router does not allow me to explicitly declare a static IP, I do not know which IP I'm supposed to give to pi-hole during configuration.

You should change the IP of the Pi-hole to be within the 192.168.1.x subnet, as that is what the router is set to use. In your previous screenshot the router was selected as being the DHCP server, is it still doing that? If so, then make sure to configure it to hand out the Pi-hole's IP as the DNS server, not the router's IP. Some routers will still give out their IP address and internally forward, which you can overcome either by changing an option in the router if it exists or by using Pi-hole for your DHCP server.

The IP you should give to Pi-hole is the IP which clients will get when they ask for a blocked domain. This should be the Pi-hole device's IP address.

Aha, now I understand what you mean by "host PC".
Its the host running the VMware hypervisor and probably previously, or still do, run Oracle's Virtualbox alongside.

But you probably setup an /24 ( subnet mask for the physical network adapter "Ethernet adapter Ethernet" with an 192.168.1.X IP address.
While the VM itself got an IP address with probalby also a /24 subnet mask.
This probably means there is no route between those two different subnet's.
Can you ping the VM ( or connect to it via SSH from the host PC ?
And what is displayed on the host PC when run below one ?

route print

If there is no route from the one subnet to the other, you could setup the host PC to do the routing.
But this will put extra load on your Windows host PC thats not desired.
Better assign the VM an IP address in the same subnet mask as that the host PC is in (192.168.1.X) so you dont need additional routing.

@Mcat12 beat me to it :wink:


What I still don't know and am trying to figure out is how to get my router to hand out a specific IP as the DNS server. I've had a few rounds with Netgear support, but I really don't think they really understood my request, even after taking 10 minutes to explain my scenario and what I was attempting to do.

See these screenshots in case this helps you to identify any obvious numbers. As of this snapshot, I've turned off the Linux VPN and set my router back to factory default state (DHCP is enabled).

I've even tried to find a residential router that allows one to set static IPs in DHCP, but I could not find (yet) any such routers. I just get taken back to the same unhelpful Netgear support page. It didn't help me.

At this point, I think I've been going in circles for over a day and I'm tempted to throw in the towel. If only I had a router with an DHCP interface that simply allows one to create a static IP, like in the oft-cited pi-hole configuration document.

Alternatives for the Netgear DHCP server:

  • Get Pi-hole running properly in the VM so you get what you want as Pi-hole will automaticly push the right DNS server to its clients if using its DHCP service.
  • Setup DHCP server software on the Windows host PC.


It appears that I get a response when I ping the VM.

Pinging with 32 bytes of data:
Reply from bytes=32 time<1ms TTL=64
Reply from bytes=32 time<1ms TTL=64
Reply from bytes=32 time<1ms TTL=64
Reply from bytes=32 time<1ms TTL=64

Ping statistics for
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

And this is what route print looks like. I don't know how to interpret this, so I don't know if this answers your question of whether there is a route from one subnet to another.

Interface List
4...00 ff 2c 0b b4 68 ......TunnelBear Adapter V9
17...d0 50 99 a7 30 fc ......Killer e2400 Gigabit Ethernet Controller
2...0a 00 27 00 00 02 ......VirtualBox Host-Only Ethernet Adapter
9...00 50 56 c0 00 01 ......VMware Virtual Ethernet Adapter for VMnet1
12...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet8
6...00 ff 4c 06 ee fe ......Anchorfree HSS VPN Adapter
1...........................Software Loopback Interface 1
5...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface

IPv4 Route Table

Active Routes:
Network Destination Netmask Gateway Interface Metric 25 On-link 331 On-link 331 On-link 331 On-link 281 On-link 281 On-link 281 On-link 281 On-link 281 On-link 281 On-link 291 On-link 291 On-link 291 On-link 291 On-link 291 On-link 291 On-link 331 On-link 281 On-link 281 On-link 291 On-link 291 On-link 331 On-link 281 On-link 281 On-link 291 On-link 291

Persistent Routes:

IPv6 Route Table

Active Routes:
If Metric Network Destination Gateway
5 331 ::/0 On-link
1 331 ::1/128 On-link
5 331 2001::/32 On-link
5 331 2001:0:9d38:90d7:2886:34e6:b6e7:6e0f/128
2 281 fe80::/64 On-link
17 281 fe80::/64 On-link
9 291 fe80::/64 On-link
12 291 fe80::/64 On-link
5 331 fe80::/64 On-link
12 291 fe80::8bf:b942:ec8f:9bf7/128
17 281 fe80::2091:37dd:1825:57b9/128
5 331 fe80::2886:34e6:b6e7:6e0f/128
2 281 fe80::356a:c718:ec8:8f64/128
9 291 fe80::b1f1:e541:9fb5:92a2/128
1 331 ff00::/8 On-link
2 281 ff00::/8 On-link
5 331 ff00::/8 On-link
17 281 ff00::/8 On-link
9 291 ff00::/8 On-link
12 291 ff00::/8 On-link

Persistent Routes:

And can you SSH from the host PC to the VM ?
I'll have looksee at route now.

EDIT: Owh and post routes for the VM as well with below command:


Routes look OK on the host PC.
But they are setup by VMware or else the VM wouldn't be able to talk to the internet:

Nov 23 20:26:00 dnsmasq[64905]: query[AAAA] from
Nov 23 20:26:00 dnsmasq[64905]: forwarded to
Nov 23 20:26:00 dnsmasq[64905]: reply is
Nov 23 20:26:00 dnsmasq[64905]: reply is

EDIT: Still , my opinion is you want the VM to have an IP in the same range as your host PC and Netgear router is in.
Anything that needs additional routing is extra load for thehost PC.

I was not able to SSH. I got a "A connection attempt failed because the connected party did not properly respond."

How hard is it to assign the VM a different IP in the same subnet as PC and router ?

I don't know. Looking into the VMWare options to see whether I could do that.

Probably when you created the VM with VMware, you were able to set the IP before the software deployed.
But now with a running VM, you'll need to change IP in Ubuntu and cant change with VMware.
But you do need to check if VMware creates a bridge, vlan or virtual network for this VM and adjust settings accordingly.

I believe when you run "pihole -r" , it allows you to set a different IP address etc.
Else you need to google how your Ubuntu distro handles IP settings.

Simply setting "bridged network" alone when configuring my VM isn't enough, as I'm unable to connect to the Internet when logged into the VM.

I'm going to call it a day and see if I can attack this from a fresh direction I haven't tried yet.