Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 have a home server set up as my internet gateway. IP fowarding and such is working fine, but for some reason the server keeps grabbing a DHCP address instead of sticking with the static address I have set up in /etc/network/interfaces. eth1 keeps switching over to a DHCP address (sort of oddly.. assigned by the DHCP server running on itself).

My first thought was Network Manager, but it doesn't seem to be installed.

Here's my interfaces file:

# The loopback network interface
auto lo
iface lo inet loopback

# External interface to the outside world
auto eth0
iface eth0 inet dhcp
    pre-up iptables-restore < /etc/iptables.rules

# Our local network, we're the DHCP server
auto eth1
iface eth1 inet static

Are there any other utilities installed by default that might be resetting the network interface?

share|improve this question
up vote 8 down vote accepted

Turns out this was a simple not having rebooted problem.

I had changed my /etc/network/interfaces to set the static interface, but never rebooted. This left dhclient running for eth1, which eventually went to renew the DHCP address. Killing dhclient fixed the problem, and with the interfaces file defining a static IP, it was not started on the next reboot.

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.