{"id":15023850,"url":"https://github.com/homeall/dhcphelper","last_synced_at":"2026-03-09T06:02:46.521Z","repository":{"id":55394875,"uuid":"324250018","full_name":"homeall/dhcphelper","owner":"homeall","description":"DHCP relay for DHCP Server in the docker container.","archived":false,"fork":false,"pushed_at":"2026-02-23T04:28:42.000Z","size":412,"stargazers_count":36,"open_issues_count":1,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-23T12:59:26.582Z","etag":null,"topics":["broadcast","dhcp","dhcp-relay","dhcp-server","dhcphelper","dhcpoffer","dhcpoffer-messages","docker","pihole"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/homeall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"homeall","buy_me_a_coffee":"homeall"}},"created_at":"2020-12-24T23:05:19.000Z","updated_at":"2026-02-23T04:27:02.000Z","dependencies_parsed_at":"2024-02-01T10:25:44.473Z","dependency_job_id":"6472eafb-9312-42a5-82f3-8679035c6997","html_url":"https://github.com/homeall/dhcphelper","commit_stats":{"total_commits":152,"total_committers":3,"mean_commits":"50.666666666666664","dds":0.4144736842105263,"last_synced_commit":"dab7984f0f17e7815f85431d21295bee2f8e3fd4"},"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"purl":"pkg:github/homeall/dhcphelper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homeall%2Fdhcphelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homeall%2Fdhcphelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homeall%2Fdhcphelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homeall%2Fdhcphelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/homeall","download_url":"https://codeload.github.com/homeall/dhcphelper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homeall%2Fdhcphelper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30284629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["broadcast","dhcp","dhcp-relay","dhcp-server","dhcphelper","dhcpoffer","dhcpoffer-messages","docker","pihole"],"created_at":"2024-09-24T19:59:32.298Z","updated_at":"2026-03-09T06:02:46.483Z","avatar_url":"https://github.com/homeall.png","language":"Dockerfile","funding_links":["https://github.com/sponsors/homeall","https://buymeacoffee.com/homeall","https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20coffee\u0026slug=homeall\u0026button_colour=FFDD00\u0026font_colour=000000\u0026font_family=Arial\u0026outline_colour=000000\u0026coffee_colour=ffffff"],"categories":[],"sub_categories":[],"readme":"[![dhcphelper](https://github.com/homeall/dhcphelper/workflows/CI/badge.svg)](https://github.com/homeall/dhcphelper/actions)\n![Trivy Workflow Status](https://github.com/homeall/dhcphelper/actions/workflows/security-scan.yml/badge.svg?branch=main)\n[![Docker pulls](https://img.shields.io/docker/pulls/homeall/dhcphelper)](https://img.shields.io/docker/pulls/homeall/dhcphelper)\n[![Docker Image Size](https://img.shields.io/docker/image-size/homeall/dhcphelper/slim)](https://hub.docker.com/r/homeall/dhcphelper)\n[![GitHub Actions](https://img.shields.io/badge/GitHub_Actions-2088FF?logo=github-actions\u0026logoColor=white)](#) \n[![Docker](https://img.shields.io/badge/Docker-2496ED?logo=docker\u0026logoColor=fff)](#) \n[![Alpine Linux](https://img.shields.io/badge/Alpine%20Linux-0D597F?logo=alpinelinux\u0026logoColor=fff)](#) \n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://ionut.vip)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fhomeall%2Fdhcphelper.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fhomeall%2Fdhcphelper?ref=badge_shield)\n\n# DHCP Relay in docker\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails open=\"open\"\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#potentials-issues\"\u003ePotentials issues\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n       \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#testing\"\u003eTesting\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n       \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#pihole-and-dhcp-relay\"\u003ePiHole and DHCP Relay\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#acknowledgements\"\u003eAcknowledgements\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project  \n\nThis is a small docker image with a [DHCP Helper](http://www.thekelleys.org.uk/dhcp-helper/) useful in case when you have a DHCP server in the docker environment and you need a relay for broadcast.\n\nThe DHCP server in the container does get only *unicast the DHCPOFFER messages* when it will have to get **broadcast DHCPOFFER messages** on the [network](https://stackoverflow.com/questions/38816077/run-dnsmasq-as-dhcp-server-from-inside-a-docker-container).\n\nIt will **not** work the DHCP server in docker even in **networking host mode** unless you are using any DHCP relay.\n\n:man_student: If you need to know more about how it works **DHCP protocol**, I highly recommend this [link](https://superuser.com/questions/811501/understanding-dhcp-discovery-specific-subnet).\n\n## ☕️ Support HomeAll\n\nEnjoying my home lab and IT projects?  \n[Buy me a coffee](https://buymeacoffee.com/homeall) to keep the ideas coming!\n\n[![Buy Me a Coffee](https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20coffee\u0026slug=homeall\u0026button_colour=FFDD00\u0026font_colour=000000\u0026font_family=Arial\u0026outline_colour=000000\u0026coffee_colour=ffffff)](https://buymeacoffee.com/homeall)\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\n:beginner: It will work on any Linux box amd64 or [Raspberry Pi](https://www.raspberrypi.org) with arm64 or arm32.\n\n### Prerequisites\n\n[![Made with Docker !](https://img.shields.io/badge/Made%20with-Docker-blue)](https://github.com/homeall/dhcphelper/blob/main/Dockerfile)\n\nYou will need to have:\n\n* :whale: [Docker](https://docs.docker.com/engine/install/)\n* :whale2: [docker-compose](https://docs.docker.com/compose/)\n \u003eThis step is optional\n\n\n\u003c!-- USAGE --\u003e\n## Usage\n\nYou only need to pass as variable the IP address of DHCP server: `\"-e IP=X.X.X.X\"`\n\nYou can run as:\n\n`docker run --privileged -d --name dhcp --net host -e \"IP=172.31.0.100\" homeall/dhcphelper:latest`\n\n![](./assets/dhcphelper.gif)\n\n### Potentials issues\n\n:warning: Please make sure your host has port **67 on UDP** *open* on **iptables/firewall** of your OS and it is running on network host mode **ONLY**.\n\n:bangbang: You can run the following command to see that is working:\n\n```\n$ nc -uzvw3 127.0.0.1 67\nConnection to 127.0.0.1 port 67 [udp/bootps] succeeded!\n```\n\n:hearts: On the status column of the docker, you will notice the `healthy` word. This is telling you that docker is running [healtcheck](https://scoutapm.com/blog/how-to-use-docker-healthcheck) itself in order to make sure it is working properly. Please test yourself using the following command:\n\n```\n$ docker inspect --format \"{{json .State.Health }}\" dhcp | jq\n{\n  \"Status\": \"healthy\",\n  \"FailingStreak\": 0,\n  \"Log\": [\n    {\n      \"Start\": \"2021-01-04T10:28:11.8070681Z\",\n      \"End\": \"2021-01-04T10:28:14.8695872Z\",\n      \"ExitCode\": 0,\n      \"Output\": \"127.0.0.1 (127.0.0.1:67) open\\n\"\n    }\n  ]\n}\n```\n:arrow_up: [Go on TOP](#about-the-project) :point_up:\n\n### Testing\n\n:arrow_right: You can run a command from Linux/Mac:\n\n`$ sudo nmap --script broadcast-dhcp-discover -e $Your_Interface`\n\n:arrow_down: Output result:\n\n```\nStarting Nmap 7.91 ( https://nmap.org ) at 2021-01-01 19:40 GMT\nPre-scan script results:\n| broadcast-dhcp-discover:\n|   Response 1 of 1:\n|     Interface: en0\n|     IP Offered: 192.168.1.30\n|     DHCP Message Type: DHCPOFFER\n|     Server Identifier: 172.31.0.100\n|     IP Address Lease Time: 2m00s\n|     Renewal Time Value: 1m00s\n|     Rebinding Time Value: 1m45s\n|     Subnet Mask: 255.255.255.0\n|     Broadcast Address: 192.168.1.255\n|     Domain Name Server: 172.31.0.100\n|     Domain Name: lan\n|     Router: 192.168.1.1\nNmap done: 0 IP addresses (0 hosts up) scanned in 10.26 seconds\n```\n\n### [PiHole](https://github.com/pi-hole/pi-hole) and DHCP Relay\n\n:moneybag: It will work amazing both together **dhcphelper** and :copyright: [PiHole](https://github.com/pi-hole/pi-hole) :yin_yang:\n\n:sparkle: A simple [docker-compose.yml](https://docs.docker.com/compose/):\n\n```\nversion: \"3.3\"\n\nservices:\n  pihole:\n    container_name: pihole\n    image: pihole/pihole:latest\n    hostname: pihole\n    ports:\n      - \"53:53/tcp\"\n      - \"53:53/udp\"\n      - \"80:80/tcp\"\n    environment:\n      TZ: 'Europe/London'\n      WEBPASSWORD: 'admin'\n      DNS1: '127.0.0.53'\n      DNS2: 'no'\n    volumes:\n      - './etc-pihole/:/etc/pihole/'\n    depends_on:\n      - dhcphelper\n    cap_add:\n      - NET_ADMIN\n    restart: unless-stopped\n    networks:\n      backend:\n        ipv4_address: '172.31.0.100'\n      proxy-tier: {}\n\n  dhcphelper:\n    restart: unless-stopped\n    container_name: dhcphelper\n    network_mode: \"host\"\n    image: homeall/dhcphelper:latest\n    environment:\n      IP: '172.31.0.100'\n      TZ: 'Europe/London'\n    cap_add:\n      - NET_ADMIN\n```\n:arrow_up: [Go on TOP](#about-the-project) :point_up:\n\n\u003c!-- LICENSE --\u003e\n## License\n\n:newspaper_roll: Check the [LICENSE](https://raw.githubusercontent.com/homeall/dhcphelper/main/LICENSE) for more information.\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\n:red_circle: Please free to open a ticket on Github. Or [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-yellow?logo=buymeacoffee\u0026logoColor=white)](https://buymeacoffee.com/homeall) 😊\n\n\u003c!-- ACKNOWLEDGEMENTS --\u003e\n## Acknowledgements\n\n* :tada: [@DerFetzer](https://discourse.pi-hole.net/t/dhcp-with-docker-compose-and-bridge-networking/17038) :trophy:\n* :tada: [@Simon Kelley](http://www.thekelleys.org.uk/dhcp-helper/) who is the **author** of *dnsmasq* and *dhcp-helper*. :1st_place_medal:\n\n:arrow_up: [Go on TOP](#about-the-project) :point_up:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomeall%2Fdhcphelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhomeall%2Fdhcphelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomeall%2Fdhcphelper/lists"}