2007年2月9日

有备无患:在Gentoo上安装Tor并配置服务器,破解GFW封锁

Tor是一个由虚拟通道组成的网络,团体和个人用它来保护自己在互联网上的隐私和安全。


个人使用 Tor 避免网站追踪他们和他们的家庭成员,或者连接到被本地ISP 封锁的新闻站点、即时通讯服务等等。
记者使用 Tor 更安全地与告密者和持不同政见者交流。
非政府组织(Non-governmental organizations, NGOs)使用 Tor,当它们的工作人员在国外时,他们可以连接自己的网站,而周围的人对他们的工作却一无所知。
独立新闻媒体(Indymedia)之类的团体建议使用 Tor 来保护他们成员在线的隐私和安全。


Tor 的用户的多样性正是使之如此安全的部分原因。 Tor 把你隐藏在网络上的其他用户之中,所以 Tor 的用户群越发庞大和复杂,你的匿名性就会得到越好的保护。

电子前沿基金会(Electronic Frontier Foundation, EFF)之类的社会活动团体正在支持 Tor 的开发工作,它被认为是维护公民在线自由的一种手段。

而对于中国的用户来说,最直接的用途就是破解中国政府GFW的网络封锁。

第一步,安装必须的Tor和Privoxy软件包


# echo "net-proxy/tsocks tordns" >> /etc/portage/package.use
# echo "net-proxy/privoxy pcre zlib" >> /etc/portage/package.use

# emerge -av tor privoxy

配置/etc/privoxy/config文件


(line 262) # logfile privoxy.log
(line 288) # jarfile jarfile
(line 571) #debug   1    # show each GET/POST/CONNECT request
(line 1008) forward-socks4   /   localhost:9050 .
(line 1009) # Don't forget the '.' at the end!

第二步,启动Tor和Privoxy


# cp /etc/tor/torrc.sample /etc/tor/torrc
# /etc/init.d/tor start
# /etc/init.d/privoxy start

(将Tor和Privoxy添加为系统默认启动)
# rc-update add privoxy default
# rc-update add tor default

第三步,安装Firefox Extension:Tor Button FoxyProxy

第四步,配置Tor服务器< /etc/tor/torrc


(line 94) Nickname idoshicntorserver
(line 97) Address 58.24.98.60
(line 107) ORPort 9001
(line 146) ExitPolicy reject *:* # middleman only -- no exits allowed
(line 148) ## To limit your bandwidth usage, define this. Note that BandwidthRate
(line 149) ### must be at least 20 KB.
(line 150) BandwidthRate 20 KB        # Throttle traffic to 20KB/s (160Kbps)
(line 151) BandwidthBurst 50 KB       # But allow bursts up to 50KB/s (400Kbps)

重新启动Tor


# /etc/init.d/tor restart

检查Tor服务器是否启动,执行指令:


# cat /var/log/tor/tor.log |grep Self-testing
(如果显示下列记录,则表示服务器启动成功。)
  Self-testing indicates your ORPort is reachable from the outside. Excellent. 

参考资源




2007-8-28 UPDATE: 最新的Tor不再需要安装privoxy。

2007年2月6日

悠言悠闲:最近在听

最近一直在听Keren Ann《Not Going Anywhere》。轻声细语的低声吟唱,最适合一个人在安静的房间里独自聆听。


订阅我的博客

搜索我的博客

正在加载...

我的豆瓣广播

分享阅读

豆瓣秀

休斯敦火箭

我的文章归档

版权申明