openwrt使用nps内网穿透工具

默认分类
3304 0

1.linux nps服务端安装

##github 发布页 https://github.com/ehang-io/nps/releases
##下载系统对应的压缩包
wget https://github.com/ehang-io/nps/releases/download/v0.26.10/linux_amd64_server.tar.gz
##国内用户用这个
wget https://ghproxy.com/github.com/ehang-io/nps/releases/download/v0.26.10/linux_amd64_server.tar.gz

2.解压并安装

mkdir /root/nps && tar -xzf linux_amd64_server.tar.gz -C /root/nps 
##cd 至解压目录
cd /root/nps 
##安装 
./nps install 

看到类似关键词就是安装成功了:You can start with:
nps start|stop|restart|uninstall|update or nps-update update

启动: nps start
关闭:nps stop
重启:nps restart 
卸载:nps uninstall

浏览器访问ip:端口 默认web端口是8080 账号密码 admin 123

Screen_22-01-0221377.png

nps.conf配置自定义修改

vim /etc/nps/conf/nps.conf
服务端客户端通信端口 默认8024
bridge_port=8024

默认监听http 80,https 443,可以修改成其它
比如我的,修改成
http_proxy_port=8001
https_proxy_port=8443

web管理
web_username=admin ##管理员用户名
web_password=123 ##管理员密码
web_port = 8080 ##web网页访问端口

安全措施:小白记得注释auth_crypt_key =1234567812345678
,在前面加个#即可,避免弱密码被入侵(改密也可)

更多请访问官方文档: nps

openwrt nps客户端配置

我刷入的openwrt自带nps,路径:luci--服务--nps内网穿透

Screen_22-01-0221003.png

Screen_22-01-0221268.png

假如我要访问家里的n1 openwrt后台

添加一个tcp隧道转发即可。

填n1的客户端id,服务器端口,以及n1的内网ip:端口

Screen_22-01-0222362.png

我这里写的端口8888,所以访问客户端后台为http://ip:8888
npc.png

最后更新 2023-01-20
评论 ( 0 )
OωO
隐私评论