# Configuration problem when using rpi as wifi range extender / shared connection

**URL:** https://discourse.pi-hole.net/t/configuration-problem-when-using-rpi-as-wifi-range-extender-shared-connection/10113
**Category:** Help
**Created:** [June 5, 2018, 5:35am UTC](https://discourse.pi-hole.net/t/configuration-problem-when-using-rpi-as-wifi-range-extender-shared-connection/10113 "2018-06-05T05:35:55Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)
#### Post date: [June 6, 2018, 8:44am UTC](https://discourse.pi-hole.net/t/configuration-problem-when-using-rpi-as-wifi-range-extender-shared-connection/10113/4 "2018-06-06T08:44:16Z")

</div>

> [@HellboundTKR](#):
>
> pi-hole is currently sinkholing ads before they reach my internal network however, if i browse from the pii, adds are let through. I assume this is because i configure pi-hole to run on eth0. should i be running it on Wlan0 instead?

Initially you want dnsmasq to listen on all IP addresses 0.0.0.0 instead of only on localhost 127.0.0.1 and 10.42.0.1.  
Like so (mine is also doing DHCP on port 67 UDP):

```
pi@noads:~ $ sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:471'
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:4711 0.0.0.0:* LISTEN 472/pihole-FTL
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 710/lighttpd
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 27880/dnsmasq
tcp6 0 0 :::80 :::* LISTEN 710/lighttpd
tcp6 0 0 :::53 :::* LISTEN 27880/dnsmasq
udp 0 0 0.0.0.0:53 0.0.0.0:* 27880/dnsmasq
udp 0 0 0.0.0.0:67 0.0.0.0:* 27880/dnsmasq
udp6 0 0 :::53 :::* 27880/dnsmasq

```

Sounds like that Parot OS is already starting its own dnsmasq instance in a jail probably for DNS caching.  
Need to figure out how to stop and disable that instance to allow Pi-hole to start its own dnsmasq instance.  
Or configure the instance running in the jail with the necessary settings for Pi-hole though this could cause issues as the config files are not at the location Pi-hole is expecting (cant use the web GUI to change settings).  
Here are my dnsmasq settings for comparison (older version of Pi-hole though):

```
pi@noads:~ $ grep -v '^#\|^$' -R /etc/dnsmasq*
/etc/dnsmasq.conf:conf-dir=/etc/dnsmasq.d
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/gravity.list
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/black.list
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/local.list
/etc/dnsmasq.d/01-pihole.conf:localise-queries
/etc/dnsmasq.d/01-pihole.conf:no-resolv
/etc/dnsmasq.d/01-pihole.conf:cache-size=10000
/etc/dnsmasq.d/01-pihole.conf:log-queries
/etc/dnsmasq.d/01-pihole.conf:log-facility=/var/log/pihole.log
/etc/dnsmasq.d/01-pihole.conf:local-ttl=2
/etc/dnsmasq.d/01-pihole.conf:log-async
/etc/dnsmasq.d/01-pihole.conf:server=10.0.0.1
/etc/dnsmasq.d/01-pihole.conf:domain-needed
/etc/dnsmasq.d/01-pihole.conf:bogus-priv
/etc/dnsmasq.d/01-pihole.conf:interface=eth0

```

Whats output for below one ?

`sudo ps -aux | grep '^USER\|[d]nsmasq'`

Here is mine:

```
pi@noads:~ $ sudo ps -aux | grep '^USER\|[d]nsmasq'
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
dnsmasq 27880 0.0 6.3 16632 11668 ? S Mar15 35:52 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -r /run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service

```

If you know the PID from above command, you can kill the instance with:

`sudo kill -9 <PID>`

And check if dnsmasq is not listening anymore with the `netstat` or `ps -aux` command.  
And try start dnsmasq like the default Pi-hole installation is expecting (not in a jail):

`sudo service dnsmasq start`

And check with:

`sudo service dnsmasq status`

`sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:471'`

`sudo ps -aux | grep '^USER\|[d]nsmasq'`

On a client PC (Linux, Windows or Mac), you can check if she is blocking/redirecting a naughty domain to Pi-hole's own IP address with the `nslookup` command:

`nslookup doubleclick.com <PIHOLE_IP_ADDRESS>`

It should resemble below with 10.0.0.2 being my Pi-hole:

```
pi@arcade:~ $ nslookup doubleclick.com 10.0.0.2
Server: 10.0.0.2
Address: 10.0.0.2#53

Name: doubleclick.com
Address: 10.0.0.2

```

> [@HellboundTKR](#):
>
> ```
> #sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:471'
> Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
> tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 764/gsad
> 
> ```

Probably the reason lighttpd isn't able to start is because another daemon called "gsad" has taken the socket (port 80 TCP + IP) on the loopback interface already.  
For diagnosing, you could try stop "gsad" with:

`sudo service gsad stop`

Or kill it if you know the PID (`ps -aux`).  
Start up lighttpd:

`sudo service lighttpd restart`

Check again with the `netstat` command.  
And try access the admin page in a browser.

Or run a supported distro 😉

> [@Hardware/Software Requirements](https://discourse.pi-hole.net/t/hardware-software-requirements/273):
>
> This is a historical document and left for archival purposes. For up to date information please use [https://docs.pi-hole.net/](https://docs.pi-hole.net/) --- OLD INFORMATION --- The Installer Our intelligent installer is tailored to installations at home and behind firewalls. If you are installing Pi-hole in an environment beyond that scope, you will need to take extra security measures when installing it. Hardware Pi-hole is very lightweight as it only handles DNS queries and returns a blank HTML file so it doesn't n…

---

_[View the full topic](https://discourse.pi-hole.net/t/configuration-problem-when-using-rpi-as-wifi-range-extender-shared-connection/10113)._
