一、前言
在公司部署了一套大数据集群。为了方便测试。所以需要弄个内网穿透实现在家里访问公司内部网络,但是不想付费。所以整了个免费的内网穿透工具。
二、准备
1. 注册一个小毛球账号,获取免费的Token

2. 在后台首页下载对应版本客户端

3. 将下载的压缩文件解压后将以下两个文件上传到服务器上

三、修改ngrok.conf配置
| 属性名 | 解释 | 协议类型 |
|---|---|---|
| auth_token | 换成注册从后获取的Token | |
| 50070 | 通道名,在启动的时候指定 | |
| subdomain | 外网访问的域名前缀 | |
| http | 内网需要映射的端口地址 | HTTP |
| tcp | 内网需要映射的端口地址 | TCP |
server_addr: "ngrok2.xiaomiqiu.cn:5432"
trust_host_root_certs: true
inspect_addr: disabled
auth_token: bb2A3f7Z56Af44fcA764989b32e976d3
tunnels:
50070:
subdomain: master-50070
proto:
http: 127.0.0.1:50070
8088:
subdomain: master-8088
proto:
http: 127.0.0.1:8080
16010:
subdomain: master-16010
proto:
http: 127.0.0.1:16010
9001:
subdomain: master-9001
proto:
http: 127.0.0.1:9001
18080:
subdomain: master-18080
proto:
http: 127.0.0.1:18080
22:
remote_port: 122
proto:
tcp: 127.0.0.1:22
2181:
remote_port: 2181
proto:
tcp: 127.0.0.1:2181
四、启动
#start后面指定要启动的通道名称,我为了方便名称全部改成端口了
./ngrok -config ngrok.conf -log=ngrok.log start 50070 8088 16010 9001 22 2181 18080
五、访问
启动后会出现此信息,列出了外网访问地址
本文详细介绍如何使用小毛球的免费内网穿透工具,实现家中远程访问公司内部网络资源,包括注册账号、配置ngrok.conf文件及启动服务等关键步骤。

实现内网穿透&spm=1001.2101.3001.5002&articleId=101760748&d=1&t=3&u=780b96661ee6453a87aee5d603c4778e)
1106

被折叠的 条评论
为什么被折叠?



