Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DHCP(v4 and v6) server not working #4903

Closed
3 tasks done
rishubn opened this issue Sep 8, 2022 · 15 comments
Closed
3 tasks done

DHCP(v4 and v6) server not working #4903

rishubn opened this issue Sep 8, 2022 · 15 comments
Labels
invalid Not an issue with AGH or a misunderstanding

Comments

@rishubn
Copy link

rishubn commented Sep 8, 2022

Prerequisites

  • I have checked the Wiki and Discussions and found no answer

  • I have searched other issues and found no duplicates

  • I want to report a bug and not ask a question

Operating system type

Linux, Other (please mention the version in the description)

CPU architecture

x86

Installation

GitHub releases or script from README

Setup

On one machine

AdGuard Home version

v0.107.12

Description

What did you do?

  • Run firewall-cmd commands for Fedora linux
  • Open ports 3000, 67, 68, 53 for adguard zone
  • Disable DHCP in my router for both ipv4 and ipv6 (fritz box)
  • Enable DHCP in AGH

Expected result

Expected clients to obtain DHCP lease from machine running AGH

Actual result

Clients do not get DHCP lease

Screenshots (if applicable)

Additional information

Running on Fedora 36. See attached logs and yaml. Seems like the binary has the correct SELinux tags and the adguard zone has the correct services and ports open according to firewalld

I set the IPv4 address in the network manager to manual and gave it the IP:
192.168.178.38
SubnetMask: 255.255.255.0
Gateway: 192.168.178.1

I did not set IPv6 because I am not familiar with how to assign it manually.
I got warnings in the AGH gui that an IPv6 DHCP port was already bound to my machine's IPv6 address. Should I assign a static IPv6 address as well?

Log

2022/09/08 22:36:56.696580 [info] AdGuard Home, version v0.107.12
2022/09/08 22:36:56.696605 [info] AdGuard Home is running as a service
2022/09/08 22:36:56.738314 [info] Initializing auth module: /usr/local/bin/AdGuardHome/data/sessions.db
2022/09/08 22:36:56.738444 [info] auth: initialized.  users:1  sessions:3
2022/09/08 22:36:56.738467 [info] Initialize web module
2022/09/08 22:36:56.739224 [info] DNS cache is enabled
2022/09/08 22:36:56.739241 [info] MaxGoroutines is set to 300
2022/09/08 22:36:56.751847 [info] dhcpv4: listening
2022/09/08 22:36:56.752525 [info] AdGuard Home is available at the following addresses:
2022/09/08 22:36:56.752850 [info] Go to http://127.0.0.1:3000
2022/09/08 22:36:56.752855 [info] Go to http://[::1]:3000
2022/09/08 22:36:56.752860 [info] Go to http://192.168.178.38:3000
2022/09/08 22:36:56.752863 [info] Go to http://10.7.0.1:3000
2022/09/08 22:36:56.752867 [info] Go to http://[fddd:2c4:2c4:2c4::1]:3000
2022/09/08 22:36:56.999549 [info] Starting the DNS proxy server
2022/09/08 22:36:56.999574 [info] Ratelimit is enabled and set to 20 rps
2022/09/08 22:36:56.999581 [info] The server is configured to refuse ANY requests
2022/09/08 22:36:56.999589 [info] DNS cache is enabled
2022/09/08 22:36:56.999601 [info] MaxGoroutines is set to 300
2022/09/08 22:36:56.999618 [info] Creating the UDP server socket
2022/09/08 22:36:56.999775 [info] Listening to udp://[::]:53
2022/09/08 22:36:56.999784 [info] Creating a TCP server socket
2022/09/08 22:36:56.999891 [info] Listening to tcp://[::]:53
2022/09/08 22:36:57.000005 [info] Entering the UDP listener loop on [::]:53
2022/09/08 22:36:57.000055 [info] Entering the tcp listener loop on [::]:53
2022/09/08 22:42:21.516161 [info] dhcpv4: server is closed
2022/09/08 22:42:21.516184 [info] dhcpv6: server is closed
2022/09/08 22:42:21.557547 [info] can't check for static ip; assuming machine has static ip and going on
2022/09/08 22:42:21.558496 [info] dhcpv4: listening
2022/09/08 22:42:48.081905 [info] dhcpv4: server is closed
2022/09/08 22:42:48.082063 [info] dhcpv6: server is closed
2022/09/08 22:43:20.792229 [info] can't check for static ip; assuming machine has static ip and going on
2022/09/08 22:43:20.792864 [info] dhcpv4: listening
2022/09/08 22:44:01.297911 [info] dhcpv4: server is closed
2022/09/08 22:44:01.298159 [info] dhcpv6: server is closed
2022/09/08 22:49:19.948231 [info] can't check for static ip; assuming machine has static ip and going on
2022/09/08 22:49:19.948848 [info] dhcpv4: listening
2022/09/08 22:49:45.716899 [info] dhcpv4: server is closed
2022/09/08 22:49:45.717138 [info] dhcpv6: server is closed
2022/09/08 22:49:45.758253 [info] can't check for static ip; assuming machine has static ip and going on
2022/09/08 22:49:45.758922 [info] dhcpv4: listening
@ainar-g ainar-g added the needs investigation Needs to be reproduced reliably. label Sep 9, 2022
@EugeneOne1
Copy link
Member

EugeneOne1 commented Sep 9, 2022

@rishubn, hello, and thanks for a detailed request. It may be related to our recent changes to the DHCP message size calculation. Actully the regular log usually isn't very useful for troubleshooting the issue, so could you please collect a verbose one? You may send it to devteam@adguard.com.

Btw, it's not really secure to publish the AdGuardHome.yaml file contents. I recommend that you at least change the password.

@EugeneOne1 EugeneOne1 added the waiting for data Waiting for users to provide more data. label Sep 9, 2022
@rishubn
Copy link
Author

rishubn commented Sep 9, 2022

@rishubn, hello, and thanks for a detailed request. It may be related to our recent changes to the DHCP message size calculation. Actully the regular log usually isn't very useful for troubleshooting the issue, so could you please collect a verbose one? You may send it to devteam@adguard.com.

Btw, it's not really secure to publish the AdGuardHome.yaml file contents. I recommend that you at least change the password.

Sure, I will collect the log and email it. Thanks for the note, I have removed the yaml file and will change the passwords. Thankfully it was all temporary settings

adguard pushed a commit that referenced this issue Sep 9, 2022
Merge in DNS/adguard-home from 4904-rm-padding to master

Updates #4904.
Updates #4903.

Squashed commit of the following:

commit 8533740
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Sep 9 19:38:09 2022 +0300

    dhcpd: return dhcp msg size
@EugeneOne1
Copy link
Member

@rishubn, hello again. Could you please check the latest edge build as well? It should fix the issue if the message size is indeed causing it.

@rishubn
Copy link
Author

rishubn commented Sep 9, 2022

@rishubn, hello again. Could you please check the latest edge build as well? It should fix the issue if the message size is indeed causing it.

@EugeneOne1 Where can I get a binary of the latest edge build?

@EugeneOne1
Copy link
Member

EugeneOne1 commented Sep 9, 2022

@rishubn, well, if you've used the README.md script to install the AGH, then you may simply specify the flag -r (to reinstall) and -c edge (for channel) there:

curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -r -c edge -v

@rishubn
Copy link
Author

rishubn commented Sep 9, 2022

Thanks, I will email the logs in a few minutes

@rishubn
Copy link
Author

rishubn commented Sep 9, 2022

Sent, for both builds DHCP did not work

@rishubn
Copy link
Author

rishubn commented Sep 10, 2022

@EugeneOne1 HI, I just tested the edge build on an Ubuntu live cd and DHCPv4 worked. It seems like this is a fedora/selinux/firewalld issue. I will keep toying with it to see if I can resolve the problem. Does anyone on the team use RHEL/Centos/fedora?

@thunderclap82
Copy link

This started happening to me after updating to version .14.

@EugeneOne1
Copy link
Member

@rishubn, thanks for testing. FYI, the log files you've sent aren't actually contain any DHCP requests and responses. I suppose, there was no DHCP message exchange during capturing of the log. It ain't a distributive's issue most probably. I think, I can close the issue for now, please consider reopening it in case the device will stop accepting leases again.

@EugeneOne1
Copy link
Member

@thunderclap82, which piece of software has a version of .14? The latest AdGuard Home's version is 0.107.12 so far.

@EugeneOne1 EugeneOne1 removed needs investigation Needs to be reproduced reliably. waiting for data Waiting for users to provide more data. labels Sep 12, 2022
@EugeneOne1
Copy link
Member

@thunderclap82, I didn't get, you meant the beta version. Anyway, could you please try the edge build? It should fix the issue.

@thunderclap82
Copy link

thunderclap82 commented Sep 12, 2022

@thunderclap82, I didn't get, you meant the beta version. Anyway, could you please try the edge build? It should fix the issue.

I’m not sure how I got on the beta build but I believe it’s 108.0-b.14 I’m running on a Raspberry Pi, so how do I go about moving to an edge build?

@EugeneOne1
Copy link
Member

@thunderclap82, generally it depends on your current way of installation.

Instances installed via README.md script are able to be reinstalled with the same script. You'll need to add the flags -r to reinstall, and -c edge to specify the channel.

Installing developer's Docker images is described here.

@rishubn
Copy link
Author

rishubn commented Sep 13, 2022

Hi all, I was able to resolve this issue - it was an incorrect setting in firewalld. Thanks for your help @EugeneOne1 !

@ainar-g ainar-g added this to the v0.107.13 milestone Sep 14, 2022
@ainar-g ainar-g added invalid Not an issue with AGH or a misunderstanding and removed bug P3: Medium labels Sep 14, 2022
@ainar-g ainar-g removed this from the v0.107.13 milestone Sep 14, 2022
heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Merge in DNS/adguard-home from 4904-rm-padding to master

Updates AdguardTeam#4904.
Updates AdguardTeam#4903.

Squashed commit of the following:

commit 8533740
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Sep 9 19:38:09 2022 +0300

    dhcpd: return dhcp msg size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Not an issue with AGH or a misunderstanding
Projects
None yet
Development

No branches or pull requests

4 participants