0

I recently installed Debian 9 and since some days ago I can't update apt. I tried to ping other PC in LAN network and it can't reach they but it can ping the router. From other PC of the LAN network I can reach the Debian PC.

resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4

/etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
 allow-hotplug enp3s0
 iface enp3s0 inet static
        address 192.168.1.15
        netmask 255.255.255.0
        gateway 192.168.1.1

/etc/apt/sources.list

# deb cdrom:[Debian GNU/Linux 9.8.0 _Stretch_ - Official amd64 NETINST 20190216$

#deb cdrom:[Debian GNU/Linux 9.8.0 _Stretch_ - Official amd64 NETINST 20190216-$

deb http://ftp.it.debian.org/debian/ stretch main
deb-src http://ftp.it.debian.org/debian/ stretch main

deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main

# stretch-updates, previously known as 'volatile'
deb http://ftp.it.debian.org/debian/ stretch-updates main
deb-src http://ftp.it.debian.org/debian/ stretch-updates main

When I launch apt-get update command the result is:

0% [Connessione a ftp.it.debian.org (85.94.199.210)] [Connessione a prod.debian

and it doesn't anything else. What can I do?

gobbo001
  • 1
  • 4
  • Maybe try switching to using the http://deb.debian.org/debian CDN instead of the older 'ftp.code.debian.org'. – Zoredache Apr 16 '19 at 18:16
  • Are you sure the machine is online? If it gets stuck at 0% trying to connect to ftp.it.debian.org then do the obvious first test, `ping ftp.it.debian.org`. – Bob Dole Apr 16 '19 at 19:51

1 Answers1

0

I would start by testing the whole chain using a tool like curl and the debian mirror you have specified in sources.list:

$ curl -LIv http://ftp.it.debian.org
* Rebuilt URL to: http://ftp.it.debian.org/
*   Trying 85.94.199.210...
* TCP_NODELAY set
* Connected to ftp.it.debian.org (85.94.199.210) port 80 (#0)
> HEAD / HTTP/1.1
> Host: ftp.it.debian.org
> User-Agent: curl/7.61.1
> Accept: */*
> 
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Content-Type: text/html
Content-Type: text/html
< Accept-Ranges: bytes
Accept-Ranges: bytes
< ETag: "3184558369"
ETag: "3184558369"
< Last-Modified: Wed, 23 May 2018 02:48:55 GMT
Last-Modified: Wed, 23 May 2018 02:48:55 GMT
< Content-Length: 2142
Content-Length: 2142
< Date: Tue, 16 Apr 2019 18:06:49 GMT
Date: Tue, 16 Apr 2019 18:06:49 GMT
< Server: lighttpd/1.4.45
Server: lighttpd/1.4.45

< 
* Connection #0 to host ftp.it.debian.org left intact

This is a successful test. If you see something different, it could be a dns problem, or another connectivity problem at your end point (like a firewall, or a misconfigured proxy server).

natxo asenjo
  • 5,739
  • 2
  • 26
  • 27
  • `curl -LIv http://ftp.it.debian.org * Rebuilt URL to: http://ftp.it.debian.org/ * Trying 85.94.199.210... * TCP_NODELAY set * Trying 2001:4b78:2000:1::1... * TCP_NODELAY set * Immediate connect fail for 2001:4b78:2000:1::1: La rete non è raggiungibile ` This is the output. I don't use any proxy server and since I installed Debian I never modified firewall but before it worked – gobbo001 Apr 16 '19 at 22:47
  • apparently something has changed though, because now it's not working – natxo asenjo Apr 17 '19 at 20:05