使用nginx + xshell5实现内网穿透 (反向隧道)

版权声明:学习中。。。 https://blog.csdn.net/fangdengfu123/article/details/82732368

首先需要工具:一台公网服务器(我的是centos),客户端工具xshell

配置centos开启反向隧道功能:

# 编辑sshd配置文件
vim /etc/ssh/sshd_config

# 开启反向隧道
GatewayPorts clientspecified
# 保存退出
# 重启服务
systemctl restart sshd.service

使用nginx转发80端口请求:

这里写图片描述

配置xshell隧道链接:

这里写图片描述

这里写图片描述

链接后,xshell 提示链接成功:

这里写图片描述

猜你喜欢

转载自blog.csdn.net/fangdengfu123/article/details/82732368
今日推荐