HOW TO CHANGE YOUR IP TO STATIC ON UBUNTU SERVER

To change your IP form dynamic to static, we will need to look into the /etc/networks/interfaces -file.

sudo nano /etc/networks/interfaces

This will open up the configuration file in which you can tweak your IP setting. It will look a bit like this:
Selection_001
You will need to change a few lines in order to make your IP static. Add these changes into the file:

auto eth0
iface eth0 inet static
address 10.5.5.1
netmask 255.255.255.0
#network 10.5.5.0
#broadcast 10.5.5.31

Depending on your needs, you can also configure netmask and other necessary configurations here.
# – means that the setting is commented out, and will not apply.

Your finished file will look like this:
Selection_002

Save the file and run these commands:

sudo ifdown eth0
sudo ifup eth0

This will apply the changes made and give you a new IP. Now if you run ifconfig your IP should display as 10.5.5.1 – you now have a static IP.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s