当前位置:网站首页>内网穿透 lanproxy部署
内网穿透 lanproxy部署
2022-08-01 19:22:00 【小黑笔记】
这次得环境用的是centos 7.9
windows和Linux环境都支持安装服务端及客户端都要有jdk
服务端和客户端最好是成套下载
服务端:proxy-server
客户端:proxy-client
一、服务端部署
1、在服务端服务器中,root目录下,创建proxy目录
指令:mkdir /root/proxy
验证手段:ls /root 查看显示内容中是否含有proxy目录
2、将“服务端”内的所有文件直接上传至/root/proxy目录中
3、启动内网穿透服务
指令:chmod +x /root/proxy/bin/startup.sh
指令:/root/proxy/bin/startup.sh
验证手段:ps -ef |grep lanproxy 查看是否有反馈内容
4、设置服务开机自启动
指令:echo /root/proxy/bin/startup.sh >> /etc/rc.local
验证手段:cat /etc/rc.local 查看是否含有/root/proxy/bin/startup.sh
5、网页登录验证 http://服务器IP:8090(我得实验环境用的虚拟机)
用户名:admin 密码:admin #可在配置文件/root/proxy/conf/config.properties里修改
server.bind=0.0.0.0
server.port=4900
server.ssl.enable=true
server.ssl.bind=0.0.0.0
server.ssl.port=4993
server.ssl.jksPath=testca.jks
server.ssl.keyStorePassword=test
server.ssl.keyManagerPassword=test
server.ssl.needsClientAuth=false
config.server.bind=0.0.0.0
config.server.port=8090
config.admin.username=admin
config.admin.password=admin
6、端口开放
云主机放行:4900、4993、8090、10000-11000端口段
二、客户端部署
1、在客户端中,root目录下,创建proxy目录
指令:mkdir /root/proxy
验证手段:ls /root 查看显示内容中是否含有proxy目录
2、将“客户端”内的所有文件直接上传至/root/proxy目录中
3、创建客户端
登录服务端web管理界面,创建客户端
复制客户端密钥
登录客户端命令行界面,修改配置文件:
修改/root/proxy/conf/config.properties文件,内容如下
ssl.enable=true
ssl.jksPath=testca.jks
ssl.keyStorePassword=test
server.host=192.168.163.100 #这里写实际应用场景服务端得IP
#default ssl port is 4993
server.port=4993
client.key=a97d7d802a04430e886ccc7187d2f0c3 #客户端密钥
4、启动内网穿透客户端
指令:chmod +x /root/proxy/bin/startup.sh
指令:/root/proxy/bin/startup.sh
验证手段:ps -ef |grep lanproxy 查看是否有反馈内容
5、设置服务开机自启动
指令:echo /root/proxy/bin/startup.sh >> /etc/rc.local
验证手段:cat /etc/rc.local 查看是否含有/root/proxy/bin/startup.sh
6、登录服务端web管理界面,查看客户端在线状态
做客户端端口映射
“代理名称”:以需要映射得端口名称命名,此处以22端口为例
“公网端口”:10000-11000之间得端口,一般单个客户端分配10个连续端口号,第一个客户端端口范围10000-10009,以此类推
“后端IP端口”:127.0.0.1:22 (此处22与“代理名称保持一致”)
可添加多个端口,示例如下:
边栏推荐
猜你喜欢
【pyqt5】自定义控件 实现能够保持长宽比地缩放子控件
分享一个适用于MCU项目的代码框架
No need to crack, install Visual Studio 2013 Community Edition on the official website
Try compiling QT test on Allwinner V853 development board
Gradle系列——Gradle文件操作,Gradle依赖(基于Gradle文档7.5)day3-1
A simple Flask PIN
工作5年,测试用例都设计不好?来看看大神的用例设计总结
力扣刷题之合并两个有序数组
Become a Contributor in 30 minutes | How to participate in OpenHarmony's open source contributions in multiple ways?
Library website construction source code sharing
随机推荐
ClassID的计算中,&表示啥意思
When compiling a program with boost library with VS2013, it prompts fatal error C1001: An internal error occurred in the compiler
有点奇怪!访问目的网址,主机能容器却不行
How to query database configuration parameters in GBase 8c, such as datestyle.What function or syntax to use?
Choosing the right DevOps tool starts with understanding DevOps
Become a Contributor in 30 minutes | How to participate in OpenHarmony's open source contributions in multiple ways?
explain each field introduction
Pytorch模型训练实用教程学习笔记:一、数据加载和transforms方法总结
面试必问的HashCode技术内幕
Every calculation, & say what mean
To drive efficient upstream and downstream collaboration, how can cross-border B2B e-commerce platforms release the core value of the LED industry supply chain?
Multi-Party Threshold Private Set Intersection with Sublinear Communication-2021:解读
Write code anytime, anywhere -- deploy your own cloud development environment based on Code-server
硬件大熊原创合集(2022/07更新)
突破边界,华为存储的破壁之旅
In the background of the GBase 8c database, what command is used to perform the master-slave switchover operation for the gtm and dn nodes?
明日盛会|ApacheCon Asia 2022 Pulsar 技术议题一览
Tencent Cloud Hosting Security x Lightweight Application Server | Powerful Joint Hosting Security Pratt & Whitney Version Released
[Kapok] #Summer Challenge# Hongmeng mini game project - Sudoku (3)
From ordinary advanced to excellent test/development programmer, all the way through