我在 Ubuntu 14.04 上使用 stunnel4 安全地将连接转发到远程连接。我重新启动了 stunnel 服务,它似乎正在正常运行,但我无法打开与 127.0.0.1:8888 的连接。
$/etc/init.d/stunnel4 restart
Restarting SSL tunnels: [Started: /etc/stunnel/stunnel.conf] stunnel.
这是我的/etc/stunnel/stunnel.conf:
cert = /path/to/my/cert.pem
client = yes
[ssl_tunnel]
protocol = proxy
accept = 127.0.0.1:8888
connect = remotehost:443
我的/var/log/stunnel4/stunnel.log 完全是空的。我的 conf 文件有问题吗?
最佳答案
您确定进程已启动 - 它是否正在监听端口 8888?在运行 stunnel 之前,请确保没有其他进程已绑定(bind)到该端口。
在运行 stunnel 进程之前:
netstat -an | grep 8888
如果有进程在那个端口上运行,检查它是哪个进程(需要以sudo运行)。
sudo netstat -tulpn | grep 8888
一旦您确定没有其他进程正在监听端口 8888,请运行 stunnel 进程。查看进程是否启动。
ps -ef | grep stunnel
&
netstat -an | grep 8888
还要确保它在 127.0.0.1 上绑定(bind)(您也可以随时尝试 0.0.0.0)。
希望能帮助到你。
关于ubuntu - 尽管干净重启,Ubuntu 14.04 上的 Stunnel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27820287/