Products
GG网络技术分享 2025-10-26 03:56 1
内网穿透,顾名思义,是在局域网内部实现网络穿透的手艺。通过这种手艺,我们能突破局域网的管束,实现远程访问内网材料。本文将详细介绍怎么在Ubuntu系统上实现内网穿透。

目前市面上有很许多内网穿透工具,如ngrok、frp、natapp等。本文将以frp为例,介绍怎么在Ubuntu系统上用它实现内网穿透。
先说说我们需要在Ubuntu系统上安装frp。
# 下载最新鲜版的frp
wget https://github.com/fatedier/frp/releases/download/v0.27.0/frp_0.27.0_linux_amd64.tar.gz
# 解压缩
tar zxvf frp_0.27.0_linux_amd64.tar.gz
# 进入frp目录
cd frp_0.27.0_linux_amd64/
# 启动客户端, 连接到frp服务器
./frpc -c frpc.ini
在frp的配置文件frpc.ini中,我们需要定义需要映射的端口号。
server_addr = xxx.xxx.xxx.xxx
server_port = 7000
token = frp_token
type = http
local_ip = .local
local_port = 80
custom_domains = example.com
通过以上配置,我们已经将本地的80端口映射到了公网的example.com。接下来 我们能用远程桌面工具,如Windows的Remote Desktop Connection,连接到example.com,实现远程桌面访问。
在用内网穿透时我们需要关注平安问题。
观点。
Demand feedback