PDA

View Full Version : I can't apt-get update. Connection timed out.



v00razz
2018-09-22, 23:45
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


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

Mister_X
2018-09-23, 19:05
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.

v00razz
2018-09-23, 20:00
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.