Because the server is not in a public network IP, so I plan to Configuration frp easy remote management.
Need to have a client in the network, as well as a public IP address of the server.
frp Chinese document: https://github.com/fatedier/frp/blob/master/README_zh.md
Download: https://github.com/fatedier/frp/releases
On the client and server copy each decompression.
The frps frps.ini and placed on a machine having a public IP network.
The frpc.ini frpc and put on the machine in the network environment.
server configuration
Note If you use the cloud server, then the various security groups will be used herein port (7000) and other ports used (6000,6001) release.
Modify frps.ini
# frps.ini
[common]
bind_port = 7000
Start command
./frps -C ./frps.ini
Recommended nohup start, you can hang back
nohup ./frps -C ./frps.ini
Client Configuration
Modify frpc.ini file, assuming frps server where the public IP is xxxx;
# 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 = 6000
[mysql]
type = tcp
local_ip = 127.0.0.1
local_port = 3306
remote_port = 6001
Start frpc:
./frpc -c ./frpc.ini
Also recommended nohup start
nohup ./frpc -c ./frpc.ini
Connection ssh, MySQL
ssh -oPort=6000 [email protected]
mysql -uroot -ppassword-P6001 -hx.x.x.x
Also recommended by the server and the client will frps, frpc is set to boot from the start