aarch64设备ssh+frp内网穿透

项目地址:https://github.com/fatedier/frp/releases
项目说明:https://github.com/fatedier/frp/blob/master/README_zh.md

//系统
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04 LTS
Release:	20.04
Codename:	focal

$ arch
aarch64

$ uname -r
5.4.0-1011-raspi
//这里只介绍frpc的用法,frps使用的是waiwang.men frp
//首先根据自己的系统架构下载一个合适的frp包,我下载了 frp_0.33.0_linux_arm64.tar.gz
$ sudo tar zxvf frp_0.33.0_linux_arm64.tar.gz -C /usr/local/	//解压到一个合适的位置
$ ls
frpc           frpc.ini  frps_full.ini  LICENSE
frpc_full.ini  frps      frps.ini       systemd
//frpc 为客户端执行脚本
//frps 为服务的执行脚本
//frps.ini 和frpc.ini 为需要配置的文件(在这里主要配置frpc.ini)
//frpc_full.ini 和frps_full.ini 分别为客户端和服务端配置示例

//frp分为服务端(即公网)与客户端(即内网),如果不自己搭建服务端,可以使用一些公益frps
//如:https://www.waiwang.men/
$ cat frpc.ini //frpc简单配置如下
====分割线====
[common]	//这是与frps通讯设置(必须)
server_addr = aliyunsz.waiwang.men
server_port = 6666
token = waiwang.men

[sSh]	//这里是ssh配置
type = tcp
privilege_mode = true
local_ip = 127.0.0.1
local_port = 22
remote_port = 49998

[rdp]	//这里是rdp配置非必须
type = tcp
local_ip = 127.0.0.1
local_port = 3389
remote_port = 49999
====分割线====
//启动frpc
$ /usr/local/frp/frpc -c /usr/local/frp/frpc.ini
//根据设置ssh链接方式为
$ ssh [email protected] -p 49998

//附详细配置

[common]
server_addr = aliyunsz.waiwang.men
server_port = 6666


log_file = /tmp/frpc.log

log_level = info

log_max_days = 3

disable_log_color = false

token = waiwang.men

admin_addr = aliyunsz.waiwang.men
admin_port = 7777
admin_user = waiwang.men
admin_pwd = waiwang.men

pool_count = 5

tcp_mux = true

login_fail_exit = true

protocol = tcp

tls_enable = true

dns_server = 223.5.5.5


heartbeat_interval = 30
heartbeat_timeout = 90

[sSh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
bandwidth_limit = 5MB
use_encryption = false
use_compression = false
remote_port = 49998
health_check_type = tcp
health_check_timeout_s = 900
health_check_max_failed = 1024
health_check_interval_s = 100

[rdp]
type = tcp
local_ip = 127.0.0.1
local_port = 3389
remote_port = 49999
bandwidth_limit = 5MB
use_encryption = false
use_compression = false
health_check_type = tcp
health_check_timeout_s = 900
health_check_max_failed = 1024
health_check_interval_s = 100

[range:tcp_port]
type = tcp
local_ip = 127.0.0.1
local_port = 6010-6020,6022,6024-6028
remote_port = 39010-39020,39022,39024-39028
use_encryption = false
use_compression = false

[dns]
type = udp
local_ip = 223.5.5.5
local_port = 53
remote_port = 38001
use_encryption = false
use_compression = false

[range:udp_port]
type = udp
local_ip = 127.0.0.1
local_port = 6010-6020
remote_port = 37001-37011
use_encryption = false
use_compression = false
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章