1

So here is the issue, or one of them I should say. Ever since I installed Ubuntu Server 15.10 I haven't been able to connect to the internet, on that computer alone of course, even if I ping ip's they all give me Host Unreachable except for the computer itself of course. I've done many changes that I thought could help (got them online) but they didn't. Including changes to /etc/network/interfaces and therefore /etc/resolv.conf. Here's what that looks like now. (ip is different, dont know if i should show that to the public)

/etc/network/interfaces:

auto lo
iface lo inet loopback

auto enp0s25
iface enp0s25 inet static
    address 192.168.23.17
    netmask 255.255.255.0
    broadcast 192.168.23.255
    gateway 192.168.23.1

    dns-nameserver 192.168.23.17
    dns-search cortex.com

And in /etc/resolv.conf there's only one thing

nameserver 192.168.23.17

Command ifconfig appears like this:

enp0s25   Link encap:Ethernet HWaddr 00:1e:c9:70:c7:f5
          inet addr:192.168.23.17 Bcast:192.168.23.255 Mask:255.255.255.0
          inet6 addr:feB0::21e:c9ff:fe70:c7f5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:2721 errors:0 dropped:1 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:215574 (215.5 KB) TX bytes:1064 (1.0 KB)
          Interrupt:21 Memory:fe9e0000-fea00000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:65536 Metric:1
          RX packets:29442 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29442 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2339824 (2.3 MB) TX bytes:2339824 (2.3 MB)

Also, i cant use sudo apt-get for anything, everytime i try it it just doesnt work:

$ sudo apt-get install update
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package update

Please help me out, im going crazy. If you feel like my problem is missing some info, just request it and ill provide it no problem, but please any insight on this will help. Thank you!!

PROBLEM update: the issue has been solved, thanks to all the users that helped me solve this :) you helped a future computer scientist lol

3
  • 1
    Can you ping 8.8.8.8? Mar 5, 2016 at 6:47
  • Welcome on SuperUser Jorge, please come back (maybe register yourself) and edit your post with the update. You have answers...and attempt to try. :)
    – Hastur
    Mar 5, 2016 at 8:34
  • I did ping 8.8.8.8 before but it gives me Destination Host Unreachable, ive pinged pretty much everything, including gateway
    – Jorge
    Mar 5, 2016 at 10:40

4 Answers 4

1

If you are using apt-get install update it will try to install the update package, which i don't think is the desired action. Try apt-get update.

2
  • Good eyes, that command is not what the OP would like to do. I take for a OP typo in the question, but the answer of apt-get states at least one time he wrote :-). It is still possible that he is able to access to the repositories but not to internet eve if less probable...
    – Hastur
    Mar 5, 2016 at 8:58
  • I tried that yes XD dude im going crazy trying to figure this out... soing sudo apt-get update gives me the same result as typing sudo apt-get install update :(
    – Jorge
    Mar 5, 2016 at 10:39
0

Surely you used sudo apt-get update?

Check your DNS/IP settings on another device connected to the same network and replicate those for this machine too. Try pinging a local network device to localize the problem. Also try a known good DNS server like 8.8.8.8

1
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Mokubai
    Mar 5, 2016 at 22:14
0

If you are not able to reach internet, of course, each correct (*)apt-get command will not work.
In this case you have to understand if/where it happens. Try to do the above attempts from any shell:

  • Check the Gateway: ping 192.168.23.1
    That IP is set as your Gw (gateway).
    If the machine with that IP is up and with ping port open it will answer positively.
    If not it means that it is down, with ping port closed, or it doesn't exists (the Gw IP is wrong ).

  • Check if you exit on internet: ping 8.8.8.8.
    It is a google server that currently answering to ping (google-public-dns-a.google.com).
    You can use any other ping answering machine on internet.
    If ping answers you it means you arrived to internet and the GW is correct and working.
    If works only ping 192.168.23.1 it means that the problem is between the GW and internet.
    It is still possible that 192.168.23.1 is up working but it is not your Gw.

  • Check the DNS: host www.google.com.
    If it translates the name in IP numbers the problem is the DNS that is not able to translate name in IP. Check for it and change with a working one.
    ping 192.168.23.17: if it answer negatively maybe it's down.

  • Check the repositories
    If all the above works your internet connection works, you should be able to browse internet with firefox (or lynx if you prefer :-)) and you have to check the repositories in /etc/apt/sources.list and maybe change them with a mirror set [1] or investigating what's wrong there.


(*) Note
It's possible you wrote the wrong command instead of apt-get update to update the list or apt-get -f install to fix or apt-get upgrade to upgrade the system, you write apt-get install update.
As said by Alex the package update doesn't exist and you cannot install it.
Check it with apt-cache show update...

18
  • Thank you for the quick feedback :) ... ok so, here are all the results, all the pings give me Destination Host Unreachable except 192.168.23.17 which is the computer's ip... why would i need to check repositories? Im kinda new and need a few pointers regarding troubleshooting is quite difficult at this stage XD
    – Jorge
    Mar 5, 2016 at 10:35
  • @jorge: It means your computer is Up :-)... You still are not in need of checking the repositories. Ask to the network administrator confirm about the gw and dns of your subnet (23): they seems to be static. You can read something about it here. Basic questions: is the computer connected? is the cable plugged in both the sides and a good one? is the router turned on? I know silly questions but you have to test those too.
    – Hastur
    Mar 5, 2016 at 11:00
  • Im going to answer the questions first. Yes the computer is connected, hardwired not wifi. The cable is in perfect condition, since i can in fact connect other computers to it and it works fine. The router is turned on and works, since i have internet on my laptop etc etc. and as for the network admin, i am the network admin i think lol not sure what you mean by that, its my home server, and yes they are static... wao thank you for that page, very helpful :))))) what does it mean tho, should i edit that so its dhcp? Thanks bud
    – Jorge
    Mar 5, 2016 at 11:05
  • Do you have any other computer with the same IP (192.168.23.17) connected? Is 17 in the range of acceptable IP for the router (some routers are set to start from 100)? Which is the IP with which the laptop works when plugged to the same cable? Yes I know a lot of questions instead of only one answer, but this is the error seek procedure :)
    – Hastur
    Mar 5, 2016 at 11:10
  • no that ip is unique to that computer in my network. Only two computers connected my laptop through wifi and the computer im having trouble with which is of course the server. And hmmm... im not sure how could i know if my router is set to start from that range? 100 that is
    – Jorge
    Mar 5, 2016 at 11:12
0
sudo update-initramfs -u -k all   
sudo ifdown eth0 
sudo ifup eth0
dmesg |grep -i network

This is what can be done from the hardware side of things... let us know if it worked.

1
  • Hey thanks, the issue has been solved, and it wasnt the hardware it was just a configuration error, it was solved by editing /etc/network/interfaces and changing the ip, and dhcp. I was finally able to connect to the internet and install a GUI... Thank you
    – Jorge
    Mar 5, 2016 at 13:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .