安装 DansGuardian 时,请按照以下链接中的说明进行操作:Dansguardian 在 Ubuntu 9.10 Karmic 上使用透明代理进行内容过滤,我使用 设置 iptables,sudo iptables -t nat -A OUTPUT -p tcp -m owner ! --uid-owner proxy --dport 80 -j REDIRECT --to-port 8080
以便代理以外的任何人发出的传出 Web 请求都应重定向到代理。我将其保存到 中/etc/init.d/tproxy
,以使这些更改永久生效。
完成此操作后,我删除了 DansGuardian、squid 和 iptables,重新执行了整个过程,使用sudo apt autoremove dansguardian squid iptables
每次我运行sudo apt-get update
或sudo apt-get install ..
现在,都会出现以下错误。
dell@dell-Inspiron-5558:/etc$ sudo apt-get update
Err:1 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu zesty InRelease
Could not connect to ppa.launchpad.net:80 (91.189.95.83). - connect (111: Connection refused)
Err:2 http://archive.canonical.com/ubuntu zesty InRelease
Could not connect to archive.canonical.com:80 (91.189.91.15). - connect (111: Connection refused) [IP: 91.189.91.15 80]
Err:3 http://in.old-releases.ubuntu.com/ubuntu zesty InRelease
Could not resolve 'in.old-releases.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu zesty InRelease
Could not connect to archive.ubuntu.com:80 (91.189.88.162). - connect (111: Connection refused) [IP: 91.189.88.162 80]
Err:5 http://in.old-releases.ubuntu.com/ubuntu zesty-updates InRelease
Could not resolve 'in.old-releases.ubuntu.com'
Err:6 http://in.old-releases.ubuntu.com/ubuntu zesty-backports InRelease
Could not resolve 'in.old-releases.ubuntu.com'
Err:7 http://in.old-releases.ubuntu.com/ubuntu zesty-security InRelease
Could not resolve 'in.old-releases.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://in.old-releases.ubuntu.com/ubuntu/dists/zesty/InRelease Could not resolve 'in.old-releases.ubuntu.com'
W: Failed to fetch http://in.old-releases.ubuntu.com/ubuntu/dists/zesty-updates/InRelease Could not resolve 'in.old-releases.ubuntu.com'
W: Failed to fetch http://in.old-releases.ubuntu.com/ubuntu/dists/zesty-backports/InRelease Could not resolve 'in.old-releases.ubuntu.com'
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/zesty/InRelease Could not connect to archive.canonical.com:80 (91.189.91.15). - connect (111: Connection refused) [IP: 91.189.91.15 80]
W: Failed to fetch http://in.old-releases.ubuntu.com/ubuntu/dists/zesty-security/InRelease Could not resolve 'in.old-releases.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/zesty/InRelease Could not connect to archive.ubuntu.com:80 (91.189.88.162). - connect (111: Connection refused) [IP: 91.189.88.162 80]
W: Failed to fetch http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu/dists/zesty/InRelease Could not connect to ppa.launchpad.net:80 (91.189.95.83). - connect (111: Connection refused)
W: Some index files failed to download. They have been ignored, or old ones used instead.
提到的资源或像 ubuntu 档案库这样的存储库也无法通过浏览器访问。我怀疑这是由于在删除上述三个文件之前保存了 ip 设置所致。
iptables -t nat -A OUTPUT -p tcp -m owner ! --uid-owner proxy --dport 80 -j REDIRECT --to-port 8080
尽管我不再有 iptables,有没有办法撤消更改?
欢迎提出任何相同的建议或任何其他诊断。