尝试使用 APT 更新命令时:
# proxychains apt update
ProxyChains-3.1 (http://proxychains.sf.net)
0% [Connecting to 172.17.252.21 (172.17.252.21)]<--timeout:80-
Ign:1 http://http.kali.org/kali kali-rolling InRelease
0% [Connecting to 172.17.252.21 (172.17.252.21)]<--timeout:80-
Err:2 http://http.kali.org/kali kali-rolling Release
Cannot initiate the connection to 172.17.252.21:80 (172.17.252.21). - connect (111: Connection refused)
Reading package lists... Done
E: The repository 'http://http.kali.org/kali kali-rolling Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
目前尚不清楚原因。我使用 proxychains 指向端口 2222 上的反向 SSH 侦听端口。
我的发行版:
uname -a
Linux x.x.local 5.4.0-kali2-amd64 #1 SMP Debian 5.4.8-1kali1 (2020-01-06) x86_64 > GNU/Linux
答案1
在这种情况下,答案是另一个用户将 apt-proxy 设置更改为网络上不存在的 IP 地址。运行以下命令:
apt-config dump | grep -i proxy
如果返回任何内容,则您有一个应该删除的代理配置。
做这个:
vim /etc/apt/apt.conf
注释掉或删除包含代理设置的行。