Install
# macOS
$ brew install frps
# Ubuntu
$ curl -LO https://github.com/fatedier/frp/releases/download/v0.47.0/frp_0.47.0_linux_amd64.tar.gz; tar -xf frp_0.47.0_linux_amd64.tar.gz
Usages
Put frps
and frps.ini
onto your server A with public IP.
Put frpc
and frpc.ini
onto your server B in LAN (that can’t be connected from public Internet).
Access your computer in LAN by SSH
- Modify
frps.ini
on server A and set thebind_port
to be connected to frp clients:
# frps.ini
[common]
bind_port = 7000
- Start
frps
on server A:
./frps -c ./frps.ini
- On server B, modify
frpc.ini
to put in yourfrps
server public IP asserver_addr
field:
# 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
Note that local_port
(listened on client) and remote_port
(exposed on server) are for traffic goes in/out the frp system, whereas server_port
is used between frps.
- Start
frpc
on server B:
./frpc -c ./frpc.ini
- From another machine, SSH to server B via server A like this (assuming that username is
test
):
ssh -oPort=6000 test@x.x.x.x
Reference
FEATURED TAGS
algorithm
algorithmproblem
architecturalpattern
architecture
aws
c#
cachesystem
codis
compile
concurrentcontrol
database
dataformat
datastructure
debug
design
designpattern
distributedsystem
django
docker
domain
engineering
freebsd
git
golang
grafana
hackintosh
hadoop
hardware
hexo
http
hugo
ios
iot
java
javaee
javascript
kafka
kubernetes
linux
linuxcommand
linuxio
lock
macos
markdown
microservices
mysql
nas
network
networkprogramming
nginx
node.js
npm
oop
openwrt
operatingsystem
padavan
performance
programming
prometheus
protobuf
python
redis
router
security
shell
software testing
spring
sql
systemdesign
truenas
ubuntu
vmware
vpn
windows
wmware
wordpress
xml
zookeeper