Assigning a static IP to Ubuntu Server

posted in: Uncategorized | 0

To assign a static IP you need to edit /etc/network/interfaces.

Example: sudo nano /etc/network/interfaces

The interface will probably be called eth0.

The current entry will look something like

auto eth0
iface eth0 inet dhcp

You will need you need to change this to:

auto eth0
iface eth0 inet static
   address 192.168.1.5
   netmask 255.255.255.0
   network 192.168.1.0
   gateway 192.168.1.1
   dns-nameservers 10.253.0.2

Leave a Reply

You must be logged in to post a comment.