# Rootless docker resolve clients

**URL:** <https://discourse.pi-hole.net/t/rootless-docker-resolve-clients/63166>\
**Category:** docker\
**Created:** [May 29, 2023, 10:29am UTC](https://discourse.pi-hole.net/t/rootless-docker-resolve-clients/63166 "2023-05-29T10:29:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wecler](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/w/5daacb/32.png) [@wecler](https://discourse.pi-hole.net/u/wecler)\
**Post date:** [May 29, 2023, 10:29am UTC](https://discourse.pi-hole.net/t/rootless-docker-resolve-clients/63166/1 "2023-05-29T10:29:06Z")

</div>

Hello there,

I'm trying to setup pihole on my rootless docker setup. It's working beside of the clients which are not resolved. The only one ip shown is the gateway of the docker default bridge network.

I've tried adding some additional capabilities listed [here](https://docs.pi-hole.net/ftldns/in-depth/) but sadly I'm still without any success.

It's a clean debian bullseye setup with only rootless docker, docker compose plugin and pihole installed.

Just to add pihole on docker with root can resolve clients. I'm using pihole together with fritzbox and I do use pihole as my dns server. I actually also don't want to use my pihole as dhcp server - at least for now.

docker-compose.yml

```auto
version: "3"

# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:2023.03.1
    environment:
      WEBPASSWORD: abcdef
      TZ: 'Europe/Berlin'
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "8080:80/tcp"\
    volumes:
      - './etc-pihole:/etc/pihole'
      - './etc-dnsmasq.d:/etc/dnsmasq.d'
    cap_add:
      - CAP_NET_BIND_SERVICE
      - CAP_NET_RAW
      - NET_ADMIN # only for dhcp
    restart: unless-stopped

```

[debug\_log.txt](https://discourse.pi-hole.net/uploads/short-url/fLOVWmgVuGvJkHY6wwNb2JluPCp.txt) (24.0 KB)

```auto
Docker version 24.0.1, build 6802122
Docker Compose version v2.18.1

```

Any advices appreciated, thank you in advance 🙂

---

<div class="post-metadata">

**Author:** ![wecler](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/w/5daacb/32.png) [@wecler](https://discourse.pi-hole.net/u/wecler)\
**Post date:** [May 29, 2023, 10:43am UTC](https://discourse.pi-hole.net/t/rootless-docker-resolve-clients/63166/2 "2023-05-29T10:43:57Z")

</div>

It is sometimes like that - when you sum up your problems then you will find the solution by an accident.

The solution is to use port driver slirp4netns. This can be done by creating a new file in

`~/.config/systemd/user/docker.service.d/override.conf`

with following

`DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=slirp4netns `

don't remember to restart your docker and you're almost done - you also will have to do following

```auto
sudo sh -c "echo 0 > /proc/sys/net/ipv4/ip_unprivileged_port_start"

```

Credits to those awesome guys here [Rootless mode overwrites public IP to Docker's IP · Issue #41789 · moby/moby · GitHub](https://github.com/moby/moby/issues/41789)
