Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently inherited some server hardware from work and decided that it could be my main router at home (among other things). Ubuntu 12.04 server installation harware wise goes well and everything is found and working when I boot up.

So I begin with setting up eth1 with DHCP. This works fine and it gets a public IP address from my modem and we have a working internet connection.

Then I set up my other NIC (eth0) as static ( and this also works fine. I can access it from other computers in the network.

The problems are coming when I am trying to set up a DHCP server with isc-dhcp-server. It seems like it is working and giving the computers IP adresses but after one reboot it stops working.

After the reboot eth1 will get a public ip from the modem but it doesnt have internet access. I have to manually run dhcpcd eth1 to get it to work again. As far as I know I havent made any changes to DNS.

What am I doing wrong? I have never really had problems with this before. :)

share|improve this question

As far as I understand you are operating two DHCP servers on your network:

  1. Modem with DHCP function
  2. Server with isc-dhcp-server software

It is usually a bad idea and a source of endless trouble to have more than one and only one DHCP server.

I suggest you to try one of following scenarios A or B or C:

  • A. Use only the DHCP server of your modem. If forwarding and routing on your server between eth0 and eth1 is setup properly, your local clients on eth0 can use the DHCP server from the modem. You don't need isc-dhcp-server.


  • B. If you really want using two DHCP servers, you must cut their domains. DHCP traffic must not be propagated from eth0 to eth1 or vice versa. You can do this with netfilter/iptables by droping udp packets form and to ports 67 and 68 in the FORWARD chain:

    iptables -A FORWARD -p udp --sport 68 --dport 67 -j DROP


  • C. Deactivate the DHCP server on the modem. Config your internet connection on eth1 statically. Install isc-dhcp-server on your server.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.