pi-hole / docker-pi-hole

Pi-hole in a docker container
https://pi-hole.net
Other
8.06k stars 1.11k forks source link

Reverse DNS Lookup not working on Latest version (nslookup) #1237

Open iAmSaugata opened 1 year ago

iAmSaugata commented 1 year ago

Details

Pi-hole version is v5.14.1 (Latest: v5.14.1) AdminLTE version is v5.17 (Latest: v5.17) FTL version is v5.19.1 (Latest: v5.19.1) Container tag is: 2022.11

Self DNS Lookup not working on Latest version (nslookup), I have tested the older version, it is working as expected. In the latest version, if you open nslookup in windows, pihole unable to resolve itself. marking as unknown. with the previous version, it is working fine. I am on RPI 4 (Linux RaspberryPi 5.15.76-v8+).

Default Server:  UnKnown
Address:  192.168.0.114
>

How to reproduce the issue

Use the pprevious version pihole/pihole:2022.10

  1. docker-compose.yml contents, docker run shell command, or paste a screenshot of any UI based configuration of containers here
  2. any additional info to help reproduce

These common fixes didn't work for my issue

If the above debugging / fixes revealed any new information note it here. Add any other debugging steps you've taken or theories on root cause that may help.

PromoFaux commented 1 year ago

Am I missing something here?

C:\Users\adam>nslookup pi.hole
Server:  pi.hole
Address:  192.168.1.253

Name:    pi.hole
Address:  192.168.1.253

C:\Users\adam>nslookup google.com
Server:  pi.hole
Address:  192.168.1.253

Non-authoritative answer:
Name:    google.com
Addresses:  2a00:1450:4009:81f::200e
          142.250.187.206
iAmSaugata commented 1 year ago

This is staring from - pihole:2022.11 (docker) - Showing server itself as UnKnown image

This was fine till - pihole:2022.10 (docker) image

PromoFaux commented 1 year ago

Hmm, there were no docker-specific changes between those versions, but potentially something has changed in FTL:

Best place to start looking https://github.com/pi-hole/FTL/compare/v5.18.2...v5.19

pluim003 commented 1 year ago

Same on 2022.11.2 on my Raspberry Pi4, but my Pi2 shows:

Default Server: RaspberryPi2.fritz.box address: 192.168.178.35

iAmSaugata commented 1 year ago

This will clarify more, reverse lookup against self-host IP is not working. image

pluim003 commented 1 year ago

I get this:

afbeelding

But at least everything is working fine.

afbeelding

iAmSaugata commented 1 year ago

I get this:

C:\Users\PluimDW>nslookup Default Server: UnKnown Address: 10.0.0.10

Yup, same issue like me. Tru lookup 10.0.0.10, it will fail.

PromoFaux commented 1 year ago

I'm still unable to repro... How are your containers set up?

C:\Users\Adam>nslookup
Default Server:  pi.hole
Address:  192.168.1.253

> 192.168.1.253
Server:  pi.hole
Address:  192.168.1.253

Name:    pi.hole
Address:  192.168.1.253
iAmSaugata commented 1 year ago

I am using this.

#Name : pihole-dhcp-wireguard-socks5
version: "3.5"
services:
  # PiHole with Adguard Home DNS
  pihole:
    container_name: pihole
    #image: "pihole/pihole:2022.10"
    image: "pihole/pihole:latest"
    hostname: pihole.dns
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "8008:80/tcp"
    restart: always
    cap_add:
        - NET_ADMIN
        - SYS_NICE
    environment:
      SKIPGRAVITYONBOOT: "1"
      WEBPASSWORD: "MyPassword"
      FTLCONF_LOCAL_IPV4: "192.168.0.114"
      VIRTUAL_HOST:  "pihole.dns"
      PIHOLE_DNS_: "10.14.59.131#553"
      DNSMASQ_LISTENING: "all"
      PIHOLE_DOMAIN: "local"
      DNSMASQ_USER: "root"
      CUSTOM_CACHE_SIZE: "10000"
      DHCP_ACTIVE: "true"
      DHCP_IPv6: "false"
      IPv6: "false"
      DHCP_START: "192.168.0.10"
      DHCP_END: "192.168.0.249"
      DHCP_ROUTER: "192.168.0.1"
      DHCP_LEASETIME: "48"
      DHCP_rapid_commit: "true"
      DNS_BOGUS_PRIV: "true"
      DNS_FQDN_REQUIRED: "true"
    volumes:
      - '/home/pi/pihole-install/pihole/:/etc/pihole/'
      - '/home/pi/pihole-install/dnsmasq.d/:/etc/dnsmasq.d/'
      - '/etc/timezone:/etc/timezone:ro'
      - '/etc/localtime:/etc/localtime:ro'
    networks:
      backend:
        ipv4_address: '172.33.0.100'
      #frontproxy_proxy-tier: {}

  # Socks5 with PiHole DNS
  go-socks:
    image: serjs/go-socks5-proxy
    container_name: go-socks5
    hostname: GoSocks5
    #environment:
      #PROXY_USER: "MyPass"
      #PROXY_PASSWORD: "MyPassword"
    volumes:
      - '/etc/timezone:/etc/timezone:ro'
      - '/etc/localtime:/etc/localtime:ro'
    ports:
      - "8080:1080"
    dns:
      - "172.33.0.100"    
    restart: always
    networks:
      backend:

# WireGuard VPN with PiHole DNS
  wg-easy:
    environment:
      # Change this to your host's public address
      WG_HOST: "files.fqdn.public"
      WG_PORT: "51820"
      # Optional:
      PASSWORD: "MyPassword"
      WG_DEFAULT_ADDRESS: "10.8.0.x"
      WG_DEFAULT_DNS: "172.33.0.100"
    image: weejewel/wg-easy:latest
    container_name: wireguard
    hostname: wireguard
    volumes:
      - '/home/pi/wireguard:/etc/wireguard'
      - '/etc/timezone:/etc/timezone:ro'
      - '/etc/localtime:/etc/localtime:ro'
    ports:
      - "51820:51820/udp"
      - "51821:51821/tcp"
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
      - SYS_MODULE      
    sysctls:
      - net.ipv4.ip_forward=1
      - net.ipv4.conf.all.src_valid_mark=1
    depends_on:
      - pihole
    networks:
      backend:      

  # DHCP Helper
  dhcphelper:
    image: modem7/dhcprelay:latest
    container_name: pihole-dhcp-helper
    hostname: dhcp-helper-svr
    volumes:
      - '/etc/timezone:/etc/timezone:ro'
      - '/etc/localtime:/etc/localtime:ro'
    restart: always
    mem_limit: 20m
    mem_reservation: 6m
    network_mode: "host"
    command: ["-id", "eth0", "-iu", "br_pihole", "172.33.0.100"]
    cap_add:
      - NET_ADMIN
    depends_on:
      pihole:
        condition: service_healthy
networks:
  backend:
    ipam:
      config:
        - subnet: 172.33.0.0/16
    driver_opts:
      com.docker.network.bridge.name: br_pihole
  #frontproxy_proxy-tier:
  # external: true
iAmSaugata commented 1 year ago

It looks like after pihole:2022.10, PTR record are not getting created automatically, which is causing this issue. With pihole:2022.10 image

With latest version. image

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.

iAmSaugata commented 1 year ago

I don't think this issue will resolve anytime soon, please close this.

PromoFaux commented 1 year ago

If it's a genuine bug, then we can keep it open for sure - I've just been unable to reproduce it so far. Let me stick a label on it to keep it open and perhaps we will come across the cause

locus2k commented 11 months ago

I am experiencing this with the latest pihole. is this still an issue?

PromoFaux commented 1 month ago

Still unable to reproduce this in v5 or v6 containers....