利用frp穿透连接内网的linx系统和windows系统

网络技术4年前 (2020)发布 fdadmin
3,890 0 0

服务端的配置

# frps.ini
[common]
bind_port = 7000
说明:防火墙放行该端口
启动:./frps -c ./frps.ini
后台启动:nohup ./frps -c ./frps.ini &

客户端的配置

(1)windows系统

# frpc.ini

[common]
server_addr = x.x.x.x
server_port = 7000
[desktop]
type = tcp
local_ip = 127.0.0.1
local_port = 3389
remote_port = 6000

命令行启动: ./frpc -c ./frpc.ini
连接:远程桌面

(2)linux系统

# frpc.ini

[common]
server_addr = x.x.x.x
server_port = 7000
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6001

启动:./frpc -c ./frpc.ini
连接:ssh -oPort=6001 test@x.x.x.x
注:test为内网机器的用户名,x.x.x.x为服务器的公网IP,连接时需要输入内网test用户的密码

© 版权声明

相关文章

暂无评论

暂无评论...