运维技术交流,查看http-header

frpc_mstsc映射

frp_端口映射

问题1:每次远程连接电脑需要使用teamviewer或者向日葵 限制太多
问题2:直接使用frp映射会被公司的防火墙拦截 4G网络能正常通信
自启动问题参考:https://www.cnblogs.com/nihaorz/p/14364136.html

安装

默认使用简单的配置文件一直提示连接不上,服务器开启debug日志后 发现连接上后一直被阻断 换成手机4G网络后能正常连接,初步判断为公司的出口防火墙进行阻断 
初步想到解决的方案是 应该是防火墙对包进行过滤 考虑开启认证和tls加密是否能绕过防火墙过滤 

服务器配置文件
[root@young-app log]# cat /etc/frp/frps.ini |grep -v -E '^#|^$'
[common]
bind_addr = 0.0.0.0
bind_port = 37000
bind_udp_port = 37001
kcp_bind_port = 37000
dashboard_addr = 0.0.0.0
dashboard_port = 37500
dashboard_user = admin
dashboard_pwd = aA123$%^
enable_prometheus = false
log_file = /data/app/frp/frps.log
log_level = info
log_max_days = 3
disable_log_color = false
detailed_errors_to_client = true
authentication_method = token
authenticate_heartbeats = false
authenticate_new_work_conns = false
token = 12345678
oidc_issuer =
oidc_audience =
oidc_skip_expiry_check = false
oidc_skip_issuer_check = false
allow_ports = 1-65355
max_pool_count = 5
max_ports_per_client = 0
tls_only = false
tcp_mux = false

### 客服端配置文件
[common]
server_addr = 42.193.38.42
server_port = 37000
log_level = debug
log_max_days = 3
disable_log_color = false
authenticate_heartbeats = false
authenticate_new_work_conns = false
token = 12345678
admin_addr = 42.193.38.42
admin_port = 7400
admin_user = admin
admin_pwd = admin
pool_count = 0
tcp_mux = false
login_fail_exit = false
protocol = websocket
tls_enable = false
meta_var1 = 123
meta_var2 = 234
udp_packet_size = 1500
[mstsc]
type = tcp
local_ip = 127.0.0.1
local_port = 3389
use_encryption = false
use_compression = false
remote_port = 63389
group = test_group
group_key = 123456
health_check_type = tcp
health_check_timeout_s = 15
health_check_max_failed = 15
health_check_interval_s = 20
meta_var1 = 123
meta_var2 = 234

设置windows开机启动

将下面vbs脚本放置目录:C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

set ws=wscript.createobject("wscript.shell")
ws.run "cmd /c D:\soft\frp\frpc.exe -c D:\soft\frp\frpc_full.ini",0

重启电脑查看是否正常开启网络连接