A prerequisite for
- A public IP machine, 39.104.96. X
- One Intranet host, 172.168.1.116
- Docker is installed on both machines
- Ali cloud machine open 70001194 port TCP
Carry out the plan
- Install the FRP server on the public network
- The FRP client and OpenVPN server are installed on Intranet hosts
operation
- Install the FRP server on the public network
# cat >>/etc/frp/frps.ini << EOF
[common]
bind_port = 7000
auto_token = meethive
EOF
# docker run --network host -d -v /etc/frp/frps.ini:/etc/frp/frps.ini --name frps snowdreamtech/frps
Copy the code
- Install the FRP client on Intranet machines
$cat >>/etc/frp/frpc.ini<< EOF [common] server_addr = 39.104.180.78 # FRP server port [openvpn] type = TCP local_port = 1194 remote_port = 1194 EOF $sudo docker run --network host -d -v /etc/frp/frpc.ini:/etc/frp/frpc.ini --name frpc snowdreamtech/frpcCopy the code
- Openvpn is installed on Intranet machines
$ curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh
$ chmod +x openvpn-install.sh
$ sudo ./openvpn-install.sh
$ sudo systemctl start openvpn
Copy the code
4. Install OpenVPN on PC. Use fitme.ovpn file in Figure 4 to connect to the Intranet and test the connection to the Intranet machine