Search The Site

Setup and Configure A Static IP On Debian

There are many reasons as to why you may want to set a static IP on your Debian box. For example you may want to run a Web server or a DNS server. If you are using CentOS or RedHat please view the following article for information on how to configure a static IP address in CentOS - Redhat and Fedora. Complete the following steps to set a static IP on your Debian box.

Edit the/etc/network/interfaces file. At a terminal window type in the following command nano /etc/network/interfaces and then add your values, when you are finished your file should look like the following:

  • #iface eth0 inet dhcp
    iface eth0 inet static

Now we need to restart our networking by typing in the following: /etc/init.d/networking restart

If you want to switch back to a DHCP assigned IP address just reverse the procedure outlined above.