I'm using Ubuntu as a server running tomcat for a web application and my static IP changes every 24 hour period from xxx.xxx.xxx.100 to xxx.xxx.xxx.102 and because of that I have to restart my session. How do I fix it?

I'm new to Linux. Forgive my ignorance.


  • Are you connected to wifi and some other person using your wifi connection? – Saurav Kumar Feb 6 '14 at 18:48
  • Does your server have multiple IP addresses? When you say static address do you mean /etc/network/interfaces sets eth0 inet static ? – Rudu Feb 6 '14 at 18:55
  • No. It's a wired connection, Saurav. – padovanoob Feb 6 '14 at 19:55
  • Rudu, I set up my static IP this way: network indicator>Edit Connections>select my connection and click edit>in the IPv4 settings tab I select manual method and fill the addresses. – padovanoob Feb 6 '14 at 20:01

check your /etc/network/interfaces config file

it should be something like this:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address xxx.xxx.xxx.100
gateway xxx.xxx.xxx.1

there is also the manual that will be of help seeing as you are new :-)

Ubuntu Serverguide - Networking

You may also want to download the pdf for future use:

Ubuntu Server Guide

  • Ok, I'll test it and in 24 hours I tell if it worked =). But thank you anyway. – padovanoob Feb 6 '14 at 19:54
  • I had a problem and had to reinstall ubuntu. When I reconfigure it I tell if it worked. – padovanoob Feb 10 '14 at 16:33

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.