6

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
    address   192.168.1.1
    netmask   255.255.255.0
    network   192.168.1.0
    broadcast 192.168.1.255

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

10

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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