vps (确定服务商不禁止tor服务)
centos
lnmp
下面开始撸教程
一、
购买vps后ssh进去,执行安装lnmp环境(偷懒用了宝塔)
1
yum -y install screen wget && screen -S bt
2
wget -O install.sh http://download.bt.cn/src/install.sh && sh install.sh
二、
安装tor
yum install -y tor
三、
写入配置
1
echo “HiddenServiceDir /var/lib/tor/hidden_service/” >> /etc/tor/torrc
2
echo “HiddenServicePort 80 127.0.0.1:8080” >> /etc/tor/torrc
tor的源服务端口是8080
所以
1
/sbin/iptables -I INPUT -p tcp –dport 8080 -j ACCEPT
2
/etc/init.d/iptables save
3
service iptables restart
四、
获取自己的onion域名
1
cat /var/lib/tor/hidden_service/hostname
创建虚拟主机,绑定域名后修改其vhost.conf文件默认的80端口改为8080
如
server
{
listen 80;
server_name klyj477aua3zd7hy.onion;
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/klyj477aua3zd7hy.onion;
修改为
server
{
listen 8080;
server_name klyj477aua3zd7hy.onion;
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/klyj477aua3zd7hy.onion;
五、
重启tor
1
service tor restart
这个时候就可以访问自己的域名了!
注意:
默认的dns名称是deb.torproject.org
非常重要的私匙在 /var/lib/tor/hidden_service/ 下载
来源:六道社区 – 暗网中文论坛
微信赞赏
支付宝赞赏
- 本文固定链接: https://www.mrlong.cc/1513.html
- 转载请注明: Mr.Long 于 Mr.Long 发表
思路很清晰