pi-hosted icon indicating copy to clipboard operation
pi-hosted copied to clipboard

[BUG] Adguard home DHCP ports

Open SegoCode opened this issue 3 years ago • 0 comments

The problem

Currently the ports section in the adguard home script looks like this:

"ports": [
		"53:53/tcp",
		"53:53/udp",
		"67:67/udp",
		"68:68/udp",
		"80:80/tcp",
		"443:443/tcp",
		"443:443/udp",
		"3000:3000/tcp",
		"853:853/tcp",
		"784:784/udp",
		"853:853/udp",
		"8853:8853/udp",
		"5443:5443/tcp",
		"5443:5443/udp"
],

This is a problem if you are running fully updated Raspbian because OS use port 68 as DHCPD defaultly.

When you run docker throw this:

ERRO[0007] error waiting for container: context canceled
Error response from daemon: driver failed programming external connectivity on endpoint Adguardhome: Error starting userland proxy: listen udp4 0.0.0.0:68: bind: address already in use

Reproduce

  • Install Raspberry Pi OS (64 Bits)
  • Run sudo apg-get update && sudo apt-get full-upgrade
  • Run install_docker.sh
  • Run install_portainer.sh
  • Run sudo reboot
  • Try to install Adguard Home without change config

Solution

Following the official documentation: -P 67: 67/UDP -P 68: 68/TCP -P 68: 68/UDP: Add if you intend to use adguard home as a DHCP Server.

Simple, delete those ports from the initial configuration, if I am an advanced user and I want to configure a DHCP server for my entire network go to manual config.

References

https://github.com/AdguardTeam/AdGuardHome/issues/1049

SegoCode avatar Jul 30 '22 17:07 SegoCode

After a fresh install of Bullseye (From Raspberry Pi foundation) the following are the only ports in use (on my fresh install) according to: netstat -lnt | grep LISTEN | awk '{ print ( $4 ) }' | awk 'BEGIN{FS=":"} { print $(NF) }' | sort -n | uniq

22 111 4711 32897 34077 34791 35421

I didn't think DHCPD is installed by default typically, unless you're using the dietpi image which does install a few extra packages and other things as the user selects during OS setup. According to this port list though ADGaurd should fire right up on a fresh install of the official OS. Now you may have some port conflicts when you go to install other containers but if this is all you are running there should be no port allocation issues.

Griffen8280 avatar Aug 29 '22 20:08 Griffen8280

that's strange, some people on the internet talk about this problem: https://github.com/AdguardTeam/AdGuardHome/issues/1049#issuecomment-579211579 https://forums.raspberrypi.com/viewtopic.php?t=70514

idk, maybe apt-get full-upgrade download something strange

SegoCode avatar Aug 30 '22 04:08 SegoCode