Results 1 to 3 of 3

Thread: I can't apt-get update. Connection timed out.

  1. #1
    Join Date
    2018-Sep
    Posts
    2

    I can't apt-get update. Connection timed out.

    I blocked some IPs with iptables, iptables-persistent and ipset lately, and I must've blocked a wrong address. I can't apt update at all anymore..
    I resetted iptables, reinstalled it, autoremoved ipset.. Nothing works. I could only update kali properly when I booted into recovery mode..

    'update' is an alias for apt-get update & apt-get dist-upgrade

    I want to somehow reset all traffic rules to default.. Thanks

    Code:
    root@kali:/etc/apt# update
    0% [Connecting to 84.245.104.212 (84.245.104.212)]^C
    root@kali:/etc/apt# update
    Err:1 https://http.kali.org/kali kali-rolling InRelease
      Could not connect to 84.245.104.212:48877 (84.245.104.212), connection timed out
    Reading package lists... Done                     
    W: Failed to fetch https://http.kali.org/kali/dists/kali-rolling/InRelease  Could not connect to 84.245.104.212:48877 (84.245.104.212), connection timed out
    W: Some index files failed to download. They have been ignored, or old ones used instead.
    [2]+  Done                    gedit sources.list
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Calculating upgrade... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded
    my sources.list:
    deb https://http.kali.org/kali kali-rolling main non-free contrib

  2. #2
    Join Date
    2016-Dec
    Posts
    806
    iptables is not persistent and a reboot resets it. There must be a script somewhere that runs at boot. You'll have to find that script and remove it from the boot. Or you can reinstall.

    Just FYI, ipset will not do anything by itself, even if a set is populated; it must be used by an iptables rule.

  3. #3
    Join Date
    2018-Sep
    Posts
    2
    Its resolved. Today I remembered that I also was toying around with proxies before this problem occured. It turned out that I've set a permanent http proxy and forgot about it. The proxy is now dead and that's why there's no connection.

    Deleting the lines I've added for the proxy in /etc/environment and /etc/profile fixed the problem.

Similar Threads

  1. Internet is working but cannot access any website - connection timed out
    By Rhyperior701 in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2020-01-21, 15:18
  2. connection refused during update
    By Royal.Ninja in forum General Archive
    Replies: 7
    Last Post: 2017-09-18, 11:29
  3. Issues with wlan0 (Connection timed out)
    By luminarist in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2014-02-26, 22:14

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •