#在服務端刪除frpc和frpc.ini兩個檔案
rm -f frpc frpc.ini
#在服務端刪除frps和frps.ini兩個檔案
rm -f frps frps.ini
二、配置檔案
1、客戶端修改frps.ini檔案
#新增內容如下所示
token = abc#123&2wsx #和客戶端token一致辭
authentication_timeout = 900
max_pool_count = 20
##日誌記錄
log_file = /var/log/frps.log
log_level = info
log_max_days = 3
##埠白名單
allow_ports = 10001,10048,10058,10076,10078,11110,11222,11112,11122,11123
##dashboard濫測面板
dashboard_port = 10002
dashboard_user = admin
dashboard_pwd = admin#123@zbc
2、客戶端修改frpc.ini檔案
#新增內容如下所示
[common]
#server_addr = 101.65.43.134
server_addr = asdf.test.com #此網域名稱解釋到服務端
server_port = 10000
#protocol = kcp
##指定需要使用的協議型別,預設型別為 tcp
tls_enable = true
token = abc#123&2wsx #和服務端token一致辭
pool_count = 1
##日誌記錄
log_file = /var/log/frpc.log
log_level = info
log_max_days = 3
##配置客戶端熱載入
admin_addr = 127.0.0.1
admin_port = 7400
admin_user = admin
admin_pwd = admin
##織語客戶端外網連線
[range:ccwork_tcp]
type = tcp
local_ip = 192.168.63.140
local_port = 10001,10048,10058,10076,10078,11110,11222,11112,11122,11123
remote_port = 10001,10048,10058,10076,10078,11110,11222,11112,11122,11123
use_encryption = true
use_compression = true
三、設定成systemd服務
1、服務端frps服務
vi /etc/systemd/system/frps.service
#新增內容如下所示
[unit]
description=frp server daemon
[service]
type=******
execstartpre=-/sbin/setcap cap_net_bind_service=+ep /usr/local/frp/frps
execstart=/usr/local/frp/frps -c /usr/local/frp/frps.ini
restart=always
restartsec=20s
user=nobody
permissionsstartonly=true
[install]
wantedby=multi-user.target
2、客戶端frpc服務
vi /etc/systemd/system/frpc.service
#新增內容如下所示
[unit]
description=frp client daemon
[service]
type=******
execstartpre=-/sbin/setcap cap_net_bind_service=+ep /usr/local/frp/frpc
execstart=/usr/local/frp/frpc -c /usr/local/frp/frpc.ini
restart=always
restartsec=20s
user=nobody
permissionsstartonly=true
[install]
wantedby=multi-user.target
3、管理服務
#服務端
systemctl daemon-reload
systemctl enable frps
systemctl start frps
systemctl restart frps
systemctl stop frps
systemctl status frps
#客戶端
systemctl daemon-reload
systemctl enable frpc
systemctl start frpc
systemctl restart frpc
systemctl stop frpc
systemctl status frpc
四、雲廠商防火牆開放下列埠
443,10000-10003,10001,10048,10058,10076,10078,11110,11222,11112,11122,11123
五、服務端主機本地開放埠(或者關閉本地防火牆)
443,10000-10003,10001,10048,10058,10076,10078,11110,11222,11112,11122,11123
#執行命令
systemctl start firewalld
systemctl enable firewalld
firewall-cmd –zone=public –add-port=443/tcp –permanent
firewall-cmd –zone=public –add-port=10000-10003/tcp –permanent
firewall-cmd –zone=public –add-port=10048/tcp –permanent
firewall-cmd –zone=public –add-port=10058/tcp –permanent
firewall-cmd –zone=public –add-port=10076/tcp –permanent
firewall-cmd –zone=public –add-port=10078/tcp –permanent
firewall-cmd –zone=public –add-port=11110/tcp –permanent
firewall-cmd –zone=public –add-port=11222/tcp –permanent
firewall-cmd –zone=public –add-port=11112/tcp –permanent
firewall-cmd –zone=public –add-port=11122/tcp –permanent
firewall-cmd –zone=public –add-port=11123/tcp –permanent
firewall-cmd –reload
電腦掛機出租閒置資源賺電費錢
利用電腦閒置資源賺零花錢(適合在校生,家庭主婦)
ClikHouse安裝部署 Centos7
centos7安裝clickhouse wget content disposition wget content disposition wget content disposition wget content disposition wget content disposition wget ...
CentOS 7安裝部署GitLab
最近公司換了新的 伺服器,之前伺服器是在亞馬遜上,相對貴點,為了節約成本這次換到了國內的雲伺服器 公司把git私服也換了,之前用的gitblit,此次更新到了gitlab ce 社群版 特此記錄下安裝 部署的過程。相對來說gitlab的功能以及介面等,都要比gitblit好一些 但是就安裝來說,gi...
Centos7 安裝部署gitlab
1 安裝依賴軟體 yum y install policycoreutils openssh server openssh clients postfix 2 設定postfix開機啟動,啟動postfix。systemctl enable postfix systemctl start postf...