2

I cloned my Ubuntu Server 17.04 from a virtualbox to a physical machine as that machine was serving so I wanted to setup a new one without taking down the current install. After replacing my old system with the img i made of the virtualbox machine everything worked fine, it booted fine and my stuff was all there except for my internet.

lspci shows my RT8111/8168/8411 ifconfig shows only virtualbox adapters and a enp0s3 adapter which I don't know what this is.

There does not appear to be a /etc/udev/rules.d/70-persistent-net.rules file anymore (Is this changed? it used to be there on my 15.04 install)

How do I fix this??


Output of cat /etc/network/interfaces:

OP's picture from comments under deleted answer

  • Interesting. I'll look at this after I get back home. I might have an idea now as to what's going on. – Kaz Wolfe Oct 12 '17 at 23:13
  • Alright, I will wait for it. – КодСерфинг145 Oct 12 '17 at 23:14
  • Also, when I do sudo ifup enp0s3 it returns Cannot find device 'enp0s3' – КодСерфинг145 Oct 12 '17 at 23:35
2

Alright I happen to fix the issue, After all I was looking at the wrong spots as @Kaz Wolfe suggested and I thought in the first place that my ethernet adapter was enp0s3 but after all it was enp2s0 I changed the /etc/network/interfaces file to be the following

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp2s0
iface enp2s0 inet static
    address 10.0.0.254
    netmask 255.255.255.0
    network 10.0.0.0
    broadcast 10.0.0.255
    gateway 10.0.0.6
    dns-nameservers 8.8.8.8 208.67.222.222

Then I simply ran sudo service networking restart and ping google.com and it worked! It still does contain a lot of other network interfaces which I am not sure of what they are doing there but I think it has to do with docker and mapping ports so I will leave them alone.

|improve this answer|||||
  • 1
    This is "the proper answer" for ubuntu 15.x and later! – Aleksandar Pavić Jun 7 '18 at 7:21

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.