利用frp实现内网穿透,外网远程桌面内网windows电脑

一、下载frp

找到最新版本下载即可

	找到最新版本下载即可

win端直接解压即可,服务器端使用的是centos7

二.服务器端安装

1.下载

wget https://github.com/fatedier/frp/releases/download/v0.34.0/frp_0.34.0_linux_amd64.tar.gz

tar指令解压

tar -zxvf frp_0.34.0_linux_amd64.tar.gz

cd进入解压后文件夹

cd frp_0.34.0_linux_amd64

2.修改服务端frps.ini配置文件

[common]
#监听地址
bind_addr = 0.0.0.0
#服务端口
bind_port = 7000
#认证token
token = xxxx
#面板界面
dashboard_addr = 0.0.0.0
dashboard_port = 7500
dashboard_user = xxx
dashboard_pwd = xxx
#http服务端口
vhost_http_port = 7080
#https服务端口
vhost_https_port = 7443
#日志
  log_file = ./frps.log
  log_level = info
  log_max_days = 3

3.运行(注意目前还是在frp解压目录中进行)

./frps -c frps.ini

二、win客户端安装

1.解压后,修改frpc.ini

[common]
# frps的ip地址
server_addr = IP
# frps的端口
server_port = 7000
# 认证token
token = xxx
# 日志
log_file = ./frpc.log
log_level = info
log_max_days = 3

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 58889

[web]
type = http
local_ip = 127.0.0.1
local_port = 8080
remote_port = 10005
use_encryption = trues
use_gzip = true
custom_domains = 没有域名写IP

[RDP]
type = tcp
local_ip = 127.0.0.1
local_port = 3389
remote_port = 58888 
use_encryption = true


2.运行

frpc -c frpc.ini

注意日志写进文件了,去解压目录查看

问题

1.SSH需要win端安装ssh,我用的是openssh

2.远程桌面需要在win系统中开启,记得好像win10需要专业版才可以开启,如果遇到用户密码正确却无法验证可以在系统中改一下验证方式(具体细节可百度)

3.服务器需要开放所用的端口

4.win端启动脚本

保存至frp目录下,frp.vbs

wscript.sleep 1000*20
set ws = CreateObject("Wscript.Shell") 
ws.Run("%comspec% /k frpc.exe -c frpc.ini")

5.http没有测试

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值