2013-01-14 31 views
19

我是Tor的全新品牌,我覺得應該考慮多個Tors。我在這裏提到的多個不僅是多個實例,而且每個使用不同的代理端口,就像這裏已經做了什麼 http://www.howtoforge.com/ultimate-security-proxy-with-tor如何用不同的出口IP一次運行多個Tor進程?

我想嘗試4 Tors。但是,本教程僅適用於Arch Linux,我正在使用無頭EC2 ubuntu 64位。經歷Arch和Ubuntu之間的差異真的很痛苦。在這裏,我想知道有沒有人可以提供一些幫助來簡單地實現我的想法。

  1. 四個Tors運行在同一時間每個端口,privoxy或polipo或任何一旦它正常工作。 像: - Privoxy的< - TOR < - 9050 - Privoxy的< - TOR < - 9150 - Privoxy的< - TOR < - 9250 - Privoxy的< - TOR < - 9350

  2. 這樣,如果我嘗試返回127.0.0.1:8118,8129,8230和8321的ip,它們應該返回四個不同的ips,這表示有四個不同的Tors同時運行。然後,幾分鐘後,再次檢查,他們四個都應該再次有新的ips。

我知道我的簡單的「夢想」可以派上很多方面真實的,但是......我不僅是新的托爾,但即使還抨擊和蟒蛇...這就是爲什麼我來這裏看看你們中的一些人能否照亮我。

這些鏈接可能是有用的:

http://blog.databigbang.com/distributed-scraping-with-multiple-tor-circuits/ https://www.torservers.net/wiki/setup/server#multiple_tor_processes 最佳,

順便說一句,如果我跑 $ ps -A | grep 'tor' 我有幾個實例有,但以 「?」在tty列下,這是什麼意思,因爲我知道tty意味着終端?

+0

http://superuser.com/questions/188994/multiple-identities-at-the-same-time-using-tor –

回答

12

Chaining Tor is recommended against。你可能會變得更加匿名,而不是更好的匿名。

這樣做會產生未定義且可能不安全的行爲。然而,從理論上講,你可以獲得六跳而不是三跳,但不能保證你會得到三跳不同的跳 - 你可能會得到相同的跳數,也許以相反或混合的順序。目前還不清楚這是否安全。它從未被討論過。

您可以選擇一個入口/出口點,但是當您將路線選擇保留到Tor時,您可以獲得Tor可以提供的最佳安全性;重寫入口/出口節點可能會以我們不瞭解的方式搞砸你的匿名。因此Tor對Tor的使用非常令人沮喪。

如果你比Tor的開發人員更聰明,那麼你只應該惹火Tor的路由算法。

很久以前,The Tor Project已經棄用了privoxy/polipo。您只有recommended才能使用Tor Browser。只有Tor瀏覽器給你一個統一的Web指紋,你不會脫穎而出。

由於Tor版本0.2.3,不同的Socks, - Dns-或TransPorts通過不同的電路,因此阻止了身份關聯。這個術語是流隔離。做到這一點,你可以添加到torrc ...

SocksPort 9050 
SocksPort 9052 
SocksPort 9053 
SocksPort 9054 
#... 

...他們都會想到不同的電路。

當您使用Tor瀏覽器時,您也可以使用Tor Button的新標識功能。點擊Tor Button(綠色洋蔥)並選擇新的身份。這將重置所有瀏覽器狀態並更改Tor的電路。

And it's Tor, not TOR.

注意,使用流隔離時,要通過不同的電路並不能保證得到不同的Tor出口節點。有時候Tor只會使用不同的門禁或中間繼電器。 This is normal.

+0

我曾嘗試使用10個通道開放,我可以清楚地看到有一些重複的跳躍以相同的IP結束。 –

+0

注意,使用流隔離時,通過不同的電路不能保證獲得不同的Tor出口節點。有時候Tor只會使用不同的門禁或中間繼電器。 [這很正常。](http://tor.stackexchange.com/questions/230/when-i-click-new-identity-why-do-i-sometimes-end-up-with-the-same-exit - 繼續) - 添加到我原來的答案。 – adrelanos

+1

如果您看到自己以相同的IP地址結束,則意味着沒有足夠的出口節點。去主持一些解決它! –

0

做一個TOR配置目錄:
$> mkdir -p ~/configuration_files/tor
$> config=~/configuration_files/tor
$> cd "${config}"

複製/etc/tor/torrc配置目錄,並根據需要製作多個副本:如10
printf "torrc_%0.2s\n" {1..10} | xargs -I {} /bin/cp /etc/tor/torrc "${config}{}"

複製/etc/torsocks.conf配置目錄,並根據需要製作多個副本:如同上10
printf "torsocks_%0.2s.conf\n" {1..10} | xargs -I {} /bin/cp /etc/torsocks.conf "${config}/{}"

使新的數據目錄和修復所有權/權限:
$> sudo mkdir /var/lib/tor{1..10}

編輯配置文件有非碰撞相應的端口號:

for a in {1..10}; do 
sed -i "s/^#SocksPort 9050.*/SocksPort $((9050+${i}))/;s|^#DataDirectory /var/lib/tor|DataDirectory /var/lib/tor${i}|" torrc_${i} 
sed -i "s/server_port = 9050/server_port = $((9050+${i}))/" torsocks_${i}.conf 
sudo chmod -R --reference /var/lib/tor /var/lib/tor${i} 
sudo chown -R CHANGETHIS:CHANGETHIS /var/lib/tor${i} 
done 

注:更改CHANGETHIS用戶/組誰打算使用它的用戶。

之後,它很容易開始,你可以使用相應的配置文件 E.g.啓動tor的單個實例。 /usr/bin/tor -f "${config}/torrc_3"

要使用它,你需要做的是出口變量TORSOCKS_CONF_FILE指向相應torsocks.conf文件:
例如$> export TORSOCKS_CONF_FILE="${config}/torsocks_3.conf"

接下來,您可以修改/破壞來自該特定shell的任何應用程序,並且它將使用torsocks_3.conf代理。
嘗試:$> torify bash
$> curl www.ipmango.com/api/myip

要切換到其他代理只是簡單地使用它的torrc文件中啓動相應的Tor和導出TORSOCKS_CONF_FILE變量指向新的配置。

下面是一個簡單的別名,沒有工作,你像上述設置後,並已安裝roxterm。它會檢查netstat,看看是否代理是起來了,如果沒有它會在一個單獨的shell窗口中啓動它。

alias prox='_(){ proxy=${1:-1}; config_base="~/configuration_files/tor"; port=$((9050+${proxy})); netstat -an | { ! grep -q "127.0.0.1:${port}"; } && roxterm -e bash -c "/usr/bin/tor -f \"${config_base}/torrc_${proxy}\"; bash"; export TORSOCKS_CONF_FILE="${config_base}/torsocks_${proxy}.conf"; }; _'

要使用它:

$> prox 4 
$> torify bash 
1

我試過torrc.1,torrc.2等...但沒有奏效。

然而,這一個工作:

  1. 通過停止Tor進程:/etc/init.d/tor stop
  2. 打開gedit /etc/tor/torrc(如果你不是根放須藤之前訪問根)
  3. 搜索SocksPort 9050
  4. 現在把你想成爲流端口的任何端口(SocksPort 9060,SocksPort 9070,SocksPort 9080 ....等)
  5. 搜索ControlPort 9051
  6. 現在把你想成爲的流端口的任何端口注意,控制端口總是SOCKSPORT + 1
  7. 再次啓動Tor進程(ControlPort 9061,ControlPort 9071,ControlPort 9081 ....等。): /etc/init.d/start
  8. 檢查Tor狀態/etc/init.d/status

它應該顯示類似的東西:

tor.service - Anonymizing overlay network for TCP 
    Loaded: loaded (/lib/systemd/system/tor.service; enabled; vendor preset: enabled) 
    Active: active (running) since Fri 2016-05-13 22:18:21 GST; 1s ago 
    Process: 10259 ExecReload=/bin/kill -HUP ${MAINPID} (code=exited, status=0/SUCCESS) 
    Process: 10319 ExecStartPre=/usr/bin/tor --defaults-torrc /usr/share/tor/tor-service-defaults-torrc -f /etc/tor/torrc --RunAsDaemon 0 --verify-config (code=exited, status=0/SUCCESS) 
    Process: 10317 ExecStartPre=/usr/bin/install -Z -m 02750 -o debian-tor -g debian-tor -d /var/run/tor (code=exited, status=0/SUCCESS) 
Main PID: 10322 (tor) 
    CGroup: /system.slice/tor.service 
      └─10322 /usr/bin/tor --defaults-torrc /usr/share/tor/tor-service-defaults-torrc -f /etc/tor/torrc --RunAsDaemon 0 

May 13 22:18:20 momen-Lenovo tor[10322]: May 13 22:18:20.860 [notice] Tor v0.2.6.10 (git-71459b2fe953a1c0) running on Linux with Li... 1.2.8. 
May 13 22:18:20 momen-Lenovo tor[10322]: May 13 22:18:20.860 [notice] Tor can't help you if you use it wrong! Learn how to be safe ...warning 
May 13 22:18:20 momen-Lenovo tor[10322]: May 13 22:18:20.860 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc". 
May 13 22:18:20 momen-Lenovo tor[10322]: May 13 22:18:20.860 [notice] Read configuration file "/etc/tor/torrc". 
May 13 22:18:20 momen-Lenovo tor[10322]: May 13 22:18:20.863 [notice] Opening Socks listener on 127.0.0.1:9050 
May 13 22:18:20 momen-Lenovo tor[10322]: May 13 22:18:20.863 [notice] Opening Socks listener on 127.0.0.1:9060 
May 13 22:18:20 momen-Lenovo tor[10322]: May 13 22:18:20.863 [notice] Opening Control listener on 127.0.0.1:9051 
May 13 22:18:20 momen-Lenovo tor[10322]: May 13 22:18:20.863 [notice] Opening Control listener on 127.0.0.1:9061 
May 13 22:18:20 momen-Lenovo tor[10322]: May 13 22:18:20.863 [notice] Opening Control listener on /var/run/tor/control 
May 13 22:18:21 momen-Lenovo systemd[1]: Started Anonymizing overlay network for TCP. 

提示:某些行被省略了,使用-l來完整顯示。

+0

完美。謝謝。現在想出如何確定實例化將使用哪個sock ... – ntk4

相關問題