1

Hi I've been trying and trying to chang emy ubuntu servers IP to static so I can have people join my Minecraft server that I have set up, I've been working on it for 2 days straight with no luck, when I change my ip through sudo gedit /etc/network/interfaces I was told to change it to something similiar to this iface eth0 inet static address 192.168.1.100 netmask 255.255.255.0 gateway 192.168.1.1

but it doesnt work for me i have tried in gateway putting my routers Ip address which i found in the routers menu information that doesnt seem to work what does is when i have the ip as 10.0.0.8 or something similiar thoe i still have problems can anyone help I relaly want to get this set up and learn how to do this properly?

1

You will need to set your DNS servers manually too. Example:

vi /etc/resolv.conf

Add the lines (based on opendns):

nameserver 208.67.222.222
nameserver 208.67.220.220

restart your networking:

service networking restart

Double check your IP, Netmask and gateway. They look ok on the surface but make sure nothing else on the network is using 192.168.1.100.

The section in your interfaces file should look similar to:

iface eth0 inet static
    address 192.168.1.100
    netmask 255.255.255.0
    gateway 192.168.1.1

More information here: Set a static IP on Ubuntu

Dont forget to restart your networking after every change!

0

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo gedit /etc/network/interfaces

Change:

iface eth0 inet dhcp 

To

iface eth0 inet static 

And add the following:

  • address 10.0.1.100 (Ubuntu Server IP address)
  • netmask 255.255.255.0
  • gateway 10.0.1.1
  • network 10.0.1.0
  • broadcast 10.0.1.255
  • dns-nameservers 10.0.1.1

You can also use Google’s Public DNS which is 8.8.8.8 or 8.8.4.4 for dns-nameservers.

Once done, restart networking

sudo /etc/init.d/networking restart

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.