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

  1. Install the FRP server on the public network
  2. The FRP client and OpenVPN server are installed on Intranet hosts

operation

  1. 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
  1. 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
  1. 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