Dns 易得易失Debian

Dns 易得易失Debian,dns,debian,portforwarding,apt-get,Dns,Debian,Portforwarding,Apt Get,我有一台运行Debian Squence的Linux服务器,我不能在上面运行apt get update。我会遇到如下错误: W: Failed to fetch http://ftp.us.debian.org/debian/dists/squeeze/main/binary-i386/Packages.gz Unable to connect to 10.197.3.5:3142: 我可以成功地ping ftp.us.debian.org,但是它显示的ip地址与无法连接消息显示的ip地址不

我有一台运行Debian Squence的Linux服务器,我不能在上面运行
apt get update
。我会遇到如下错误:

W: Failed to fetch http://ftp.us.debian.org/debian/dists/squeeze/main/binary-i386/Packages.gz
Unable to connect to 10.197.3.5:3142:
我可以成功地
ping ftp.us.debian.org
,但是它显示的ip地址与无法连接消息显示的ip地址不同

我认为这是DNS翻译的问题,所以我把我的DNS服务器改成了google的8.8.8.8服务器 运行
dig google.com

显示DNS服务器实际上是我指定的google服务器。
我被难住了。可能需要注意的是,我正在将端口22端口80转发到我的路由器,以便我的队友可以
ssh
并查看与此服务器关联的网页。我不认为这是问题,因为即使我停止转发,也会发生这种情况

原来这台服务器的原始持有者在/etc/apt/apt.conf中设置了一个不起作用的代理(我不知道为什么会这样) 我从那个文件中删除这一行
Acquire::http::PROXYIP/apt cacher/”代理

我已经修复了类似的问题,并对您的问题发表了评论:

我的环境是:

Linux debianlpi 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30) x86_64 GNU/Linux
root@debianlpi:~# apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  vim-runtime
Suggested packages:
  ctags vim-doc vim-scripts
The following NEW packages will be installed:
  vim vim-runtime
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,999 kB of archives.
After this operation, 28.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
  vim-runtime vim
Install these packages without verification? [y/N] y
0% [Connecting to idcproxy.compabc.com (432.1.2.20)]
root@debianlpi:~# cat /etc/apt/apt.conf
#Acquire::http::Proxy "http://idcproxy.compabc.com:80";
我遇到的问题是:

Linux debianlpi 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30) x86_64 GNU/Linux
root@debianlpi:~# apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  vim-runtime
Suggested packages:
  ctags vim-doc vim-scripts
The following NEW packages will be installed:
  vim vim-runtime
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,999 kB of archives.
After this operation, 28.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
  vim-runtime vim
Install these packages without verification? [y/N] y
0% [Connecting to idcproxy.compabc.com (432.1.2.20)]
root@debianlpi:~# cat /etc/apt/apt.conf
#Acquire::http::Proxy "http://idcproxy.compabc.com:80";
在/etc/apt/apt.conf:

Linux debianlpi 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30) x86_64 GNU/Linux
root@debianlpi:~# apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  vim-runtime
Suggested packages:
  ctags vim-doc vim-scripts
The following NEW packages will be installed:
  vim vim-runtime
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,999 kB of archives.
After this operation, 28.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
  vim-runtime vim
Install these packages without verification? [y/N] y
0% [Connecting to idcproxy.compabc.com (432.1.2.20)]
root@debianlpi:~# cat /etc/apt/apt.conf
#Acquire::http::Proxy "http://idcproxy.compabc.com:80";

我认为您的
sourcs可能有问题。请列出
并共享您正在使用的版本。是否定义了代理?如果conf文件不存在,则可能位于
/etc/apt/conf
/etc/apt/apt.conf.d/70debconf
中。这是代理问题!这个服务器是由另一家公司设置的,我不知道他们设置了代理