Pihole on Ubuntu Server in Virtualbox VM

Please follow the below template, it will help us to help you!

I have Linux Ubuntu Server installed on a Virtualbox VM with the network in bridged mode. I can get to the admin page and it appears to be receiving queries, blocking and passing on to the client machine. However there is no internet. I’ve tried disabling firewall on the host machine but can’t seem to figure out what isn’t working.

Expected Behaviour:

I should be able to connect to the internet using my pihole dns virtual server IP address.

Actual Behaviour:

I can access the admin page and it appears to be receiving queries from the host PC IP address and passing them on and blocking. But I don’ t get any internet.

Debug Token:

I tried via command it failed to upload. Also tried on the web interface but it won’t run either just get a cross sign.

For anyone else out there struggling I did the following to fix it:

  1. Changed my Virtual box network card setting to NAT
  2. Configured to forward the ports 80:80 (TCP), 443:443 (TCP) 53:53 (UDP/TCP) and 67:67 (UDP)
  3. Reconfigured my Pihole install on the Linux Ubuntu server with pihole -r
  4. Changed the network config to a static ip and set the server IP to the IP address of the host machine NOT the VM. E.g. 192.167.1.155 and set the gateway to 127.0.0.1 .

I’m not sure entirely why this works but it does.

I think because with NAT it’s forwarding the ports from the host machine to the VM so any requests go sent to that VM virtual network. Then when it’s sending stuff back it sends it to local host then the NAT forwards it the other way again. (I might be wrong though). I’m new and learning Linux, Networking Etc. as I go.