搭建NPS内网穿透

0x01 安装NPS客户端/服务端

服务端安装

下载链接 下载地址

使用说明文档:https://ehang-io.github.io/nps/#/api

Linux查看系统架构,下图为arm架构

root@iZ2ze9muqv7y1i98lqo7ppZ:~# arch
x86_64
root@iZ2ze9muqv7y1i98lqo7ppZ:~# file /bin/bash
/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=04eca96c5bf3e9a300952a29ef3218f00487d37b, stripped

这里我的服务VPS为linux,将对应的服务端版本上传到VPS,解压tar -zxvf linux_amd64_server.tar.gz 

下一步,执行安装:

对于linux|darwin sudo ./nps install

对于windows,管理员身份运行cmd,进入安装目录 nps.exe install

下一步,修改配置文件(可不修改,最好修改一下防止端口冲突)

修改配置文件,注意我的配置在/etc/nps/conf/nps.conf,不是我当前目录的nps的nps.conf,的修改如下为web控制台账号密码

web_host=a.o.com
web_username=admin
web_password=123
web_port = 8086
web_ip=0.0.0.0

修改https/http的代理端口,防止和自己VPS端口冲突

#HTTP(S) proxy port, no startup if empty
http_proxy_ip=0.0.0.0
http_proxy_port=8081
https_proxy_port=8443
https_just_proxy=true
default https certificate setting
https_default_cert_file=conf/server.pem
https_default_key_file=conf/server.key

下一步,启动

对于linux|darwin sudo nps start

对于windows,管理员身份运行cmd,进入程序目录 nps.exe start

安装后windows配置文件位于 C:\Program Files\nps,linux和darwin位于/etc/nps

停止和重启可用,stop和restart

如果发现没有启动成功,可以使用nps(.exe) stop,然后运行nps.(exe)运行调试,或查看日志(Windows日志文件位于当前运行目录下,linux和darwin位于/var/log/nps.log)

  • 访问服务端ip:web服务端口(默认为8080)
  • 使用用户名和密码登陆(默认admin/123,正式使用一定要更改)
  • 创建客户端

访问控制台:

   增加 一个客户端配置

 添加socks5代理

客户端安装 

下载对应客户端版本

无配置文件启动 npc -server=xxx.xxx.xxx.xxx:8024 -vkey=360test

0x02 测试

在客户端机器其http服务

挂代理访问 

3389连接测试

Linux客户端测试

 启web服务

查看ip

挂代理访问

猜你喜欢

转载自blog.csdn.net/qq_38376348/article/details/107759339