Nethserver as dhcp relay agent

NethServer Version: 7.4.1708
Module: dhcp

Hi Everyone!

I’m not good speaking English. So, first of all, I apologize for my speaking mistakes…

I’m installing/configurating my first NethServer, and I want it to act as DHCP relay agent (my dhcp server is in orange zone). Is it posible?

I am not sure if it works with another subnet, this costom template works for the green zone…

Make a custom-template on the DHCP-Server:

# make folder for template
mkdir -p /etc/e-smith/templates-custom/etc/dnsmasq.conf/

# create template-file
nano /etc/e-smith/templates-custom/etc/dnsmasq.conf/99fog

# content for 99fog

# expand template
expand-template /etc/dnsmasq.conf

Maybe you have to use this:

Instead of:

I think you need some deeper search… - DNSMASQ DHCP configuration for multiple subnets


After some tests and research (in debian because is more familiar to me), I’ve read that dhcp-relay doesn’t work in dnsmasq 2.76 and 2.77.

In, for 2.78 we read:

“Fix DHCP relaying, broken in 2.76 and 2.77 by commit

So, I installed and tested dnsmasq 2.79 and it works greate!

Now I’ll try to use it in NS.
Is it posible to upgrade to dnsmasq 2.79 in NS 7.4? (Does CentOS documentation and repositories would help me?)

Or… Where can I see packages version of NS 7.5?


1 Like

Unfortunately, the answer is more a no than a yes.
NethServer “is” CentOS and it uses a version of dnsmasq that is built from CentOS.
RHEL/CentOS policy dictates that software version do not usually get updated, but the original software may be patched to support features from newer versions.
However, dnsmasq was updated to 2.76 in February 2017 by red hat.
So, it may get updated again in the future (I hope it does, I need a new feature, like you).
The usual route is to open an issue with red hat in their bugzilla or make your voice heard if the issue has been already opened.
I did a search ( and I didn’t find anything about dhcp-relay.

You have a couple more options:

  1. find an updated package somewhere (there are famous repositories, use google)
  2. build the package yourself

In case 2, you can try to rebuild the package from Fedora, it usually works and it will adopted by CentOS in the future.

For 1, I couldn’t find a package, but you may have better luck with google.


Really, really thanks for the time you spent searching this.


I have it working now!

I just install dnsmasq 2.78 manually from here:

specifically this:

And I copied /etc/dnsmasq.conf to /etc/e-smith/templates-custom/etc/dnsmasq.conf and I configured the last adding:

dhcp-relay=<ip’s relay server on green net >,<ip’s dhcp server on orange net>

I expand it:

$ sudo /sbin/e-smith/expand-template /etc/dnsmasq.conf

And, after I restarted the service, all is working now.