centos7 x搭建Tor私人網橋

2021-09-22 12:31:54 字數 2206 閱讀 6845

yum install tor -y
通過python進行編譯安裝:

yum install make automake gcc python-pip python-devel libyaml-devel
pip install obfsproxy
通過go進行編譯安裝:

git clone
go build -o obfs4proxy/obfs4proxy ./obfs4proxy
cp ./obfs4proxy/obfs4proxy /usr/bin/obfs4proxy
vim /etc/tor/torrc
log notice file /var/log/tor/notices.log

runasdaemon 1

orport 4443

exitpolicy reject *:*

bridgerelay 1

servertransportplugin obfs4 exec /usr/bin/obfs4proxy

extorport auto

publishserverdescriptor 0

systemctl restart tor
systemctl status tor
tail -f /var/log/tor/notices.log
內容如下:

[notice] your tor server's identity key fingerprint is 'unnamed 530fa95a79b9145d315f15f01215be2f3be921eb'

[notice] your tor bridge's hashed identity key fingerprint is 'unnamed 83d1ac9ec2f15d7024278461dc91a8b2e9bbf43a'

[notice] registered server transport 'obfs4' at '[::]:46396'

[notice] tor has successfully opened a circuit. looks like client functionality is working.

[notice] now checking whether orport :4443 is reachable... (this may take up to 20 minutes -- look for log messages indicating success)

[notice] self-testing indicates your orport is reachable from the outside. excellent.

注意:記住輸出中 obfs4 監聽的埠(本例中是 46396)。並且還能找到你的 server identity fingerprint(本例中是 530fa95a79b9145d315f15f01215be2f3be921eb),也複製下來。

/var/lib/tor/pt_state/obfs4_bridgeline.txt檔案中可以看到類似如下的內容:

bridge obfs4 :cert=og6a3k7cteariloup2ocuk60onmgw+jvgcnhgummkods659uegrrx7yxzuoeo9crp9ggxg iat-mode=0
obfs4 :46396 530fa95a79b9145d315f15f01215be2f3be921eb cert=6lmncxh6mifapbzimksns4kj+2sffz5pybsqtcoo5yohgfrmpkbjqvlxhur2ppau0l2seg iatmode=0
vim /etc/firewalld/zones/public.xml
內容如下(本例orport埠 => 4443, obfs4埠 => 46396):

firewall-cmd --complete-reload

CentOS 7 X 安全手記

一 安裝雲鎖 1 報錯 2 關閉selinux vim etc selinux config 將 selinux enforcing 改 selinux disabled 3 重啟系統 reboot now 二 centos7相關的操作 1 防火牆 firewall cmd 1 禁止被ping 禁止...

CentOS7 X磁碟掛載

假設掛載點為 www 假設磁碟為 dev vdc 假設磁碟只有卷 dev vdc1 該方案可能會丟失磁碟所有資料,操作前請先備份 磁碟已格式化 用過的磁碟 磁碟立即掛載 mkdir www mount dev vdc1 www 啟用開機掛載 獲取磁碟id ll dev disk by path lr...

CentOS7 X磁碟擴容

假設掛載點為 www 假設磁碟為 dev vdc 假設磁碟只有卷 dev vdc1 該方案可能會丟失磁碟所有資料,操作前請先備份 檢視磁碟是否已分割槽,以及分割槽方式為 mbr 還是 gpt 如果包含 device 資訊,表示已分割槽 分割槽表型別dos表示分割槽方式為 mbr 分割槽表型別gpt表...