mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2026-03-04 00:01:12 -05:00
DHCP Server do not works when running AdGuard with non-priviledged user #3805
Labels
No labels
P1: Critical
P2: High
P3: Medium
P4: Low
UI
bug
cannot reproduce
compatibility
dependencies
docker
documentation
duplicate
enhancement
enhancement
external libs
feature request
good first issue
help wanted
infrastructure
invalid
localization
needs investigation
performance
potential-duplicate
question
recurrent
research
snap
waiting for data
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AdGuardHome#3805
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @peracchi on GitHub (Jul 18, 2022).
I found some tips to run AdGuard Home with non-priviledged user.
After install it with
curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sudo sh -s -- -vI accessed the web interface, made all configurations and then
sudo chown -R admin:admin /opt/AdGuardHome /var/log/AdGuardHome*followed by changing
/etc/systemd/system/AdGuardHome.servicetoRebooted and everything works fine except the DHCP server. None of my devices can get an IP address.
I reverted to the original
/etc/systemd/system/AdGuardHome.servicebecause I need the DHCP server working.Any ideas of what can be the problem?
@ainar-g commented on GitHub (Jul 28, 2022):
Apologies for the delay. Can you configure AdGuard Home to collect logs by setting
verbosetotrueand inspect them fordhcperrors? Also, are you sure that no firewall is blocking ports 57 and 58?@peracchi commented on GitHub (Jul 28, 2022):
No problem!
Sure, will do this later.
I suppose no, because if it were firewall, blocking will occur with either user as AdGuard do not mess with firewall
@yscialom commented on GitHub (Aug 2, 2022):
Might be related (whild guess): #4728
@peracchi commented on GitHub (Oct 10, 2022):
I am reinstalling my Proxmox server.
At the moment DHCP server is running on my router but I will reinstall and activate DHCP on AdguardHome to try to get more info with the logs.
Obviously I will disable DHCP on my router to conduct the tests.
@peracchi commented on GitHub (Oct 10, 2022):
Just tried "Check for DHCP servers" and got "operation not permitted".
Nothing on log file.
Using AdGuardHome v0.107.16.
@ainar-g commented on GitHub (Oct 11, 2022):
I'm not sure what could be the reason, sorry. It's most likely some setting in the system. I've added the
help wantedlabel, so perhaps other people could chime in.@peracchi commented on GitHub (Oct 11, 2022):
Yes, I am curious about what can be the problem. I think that is not a firewall problem because only variable is the user (root / not root) and this do not change firewall rules.
I suspect something about the
ExecStartPre=+/sbin/setcap CAP_NET_BIND_SERVICE=+eip /opt/AdGuardHome/AdGuardHome.I will also ask in Proxmox forum -> AdGuardHome running alongside Proxmox 7.2
@CRTified commented on GitHub (Jan 1, 2023):
You need
CAP_NET_BIND_SERVICEfor opening ports <1024 (DNS server, for example).But DHCP additionally requires a raw socket (I'm unsure whether this is always the case or just specific to AGH). These require
CAP_NET_RAWas capability (For more information on capabilities, check this page). So you'd need to add this capability to theAdGuardHomebinary, as well.But I want to add another thing: systemd allows setting capabilities within the
[Service]section usingAmbientCapabilities:With these, I was able to resolve the problem. For me, the pointer was the MAC address in your screenshot, where you'd normally expect an IP address (due to it mentioning sockets).