Analysis of the implementation process of Docker intranet penetration frp deployment

Analysis of the implementation process of Docker intranet penetration frp deployment

1. Create a configuration file directory

cd /home directory

mkdir frp

The final directory structure:

2. Create a server configuration file

vi frps.ini

[common]
bind_port = 17000
token = myToken
vhost_http_port = 10080
vhost_https_port = 10443
 
dashboard_port = 17500
dashboard_user = admin
dashboard_pwd = admin
 
 
tcp_mux = true
max_pool_count = 10

3. Create a server-side yml file

vi frps-docker-compose.yml

version: '3'
services:
 
  frps:
    image: snowdreamtech/frps
    ports:
      - "17000:17000"
      - "27500:17500"
      - "10022:10022" #For ssh connection - "10080:10080" #For external network access # More ports can be added based on actual needs:
      - ./frps.ini:/etc/frp/frps.ini container_name: frps

4. Start the server

docker-compose -f frps-docker-compose.yml up Note: Enable background running -d

5. Create a client configuration file

vifrpc.ini

[common]
#Server ip
server_addr = xxxx
server_port = 17000
token = myToken
 
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 10022
use_encryption = true
use_compression = true
 
[pi.mydomain.com]
type = http
local_port = 80
custom_domains = pi.mydomain.com

6. Create client yml file

vi frpc-docker-compose.yml

version: '3'
services:
  frpc:
    image: cloverzrg/frpc-docker
    volumes:
      - ./frpc.ini:/conf/frpc.ini
    container_name: frpc
    network_mode: host

8. Start the client

docker-compose -f frpc-docker-compose.yml up -d

  • Visit the domain name http://pi.mydomain.com:10080, you can access the web page normally (the premise is that the client machine starts the http server and listens to port 80); note that the domain name A record of pi.mydomain.com should be resolved to IP xxxx first. If the server already has a corresponding domain name, you can also resolve the CNAME record to the original domain name of the server.
  • Connect remotely via ssh -p 10022 username@xxxx;
  • Visit http:xxxx:27500, and you can see the dashboard, which shows the connection status of each client.

Reference: https://liyangweb.com/service/358.html

frp Chinese document: https://www.cnblogs.com/yanglang/p/12035934.html

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Analysis of the process of deploying nGrinder performance testing platform with Docker
  • How to deploy MySQL and Redis services using Docker
  • How to install tomcat in docker and deploy the Springboot project war package
  • Steps to deploy multiple tomcat services using DockerFile on Docker container
  • Docker image creation, uploading, pulling and deployment operations (using Alibaba Cloud)
  • Detailed deployment of docker+gitlab+gitlab-runner
  • How to deploy stand-alone Pulsar and clustered Redis using Docker (development artifact)
  • Analysis of the Docker deployment Consul configuration process

<<:  Vue folding display multi-line text component implementation code

>>:  MySQL 8.0.21 installation steps and problem solutions

Recommend

Four ways to compare JavaScript objects

Table of contents Preface Reference Comparison Ma...

Explanation of Dockerfile instructions and basic structure

Using Dockerfile allows users to create custom im...

Solution to Docker image downloading too slowly

Docker image download is stuck or too slow I sear...

Idea configures tomcat to start a web project graphic tutorial

Configure tomcat 1. Click run configuration 2. Se...

Let’s talk about the symbol data type in ES6 in detail

Table of contents Symbol Data Type The reason why...

Vue implements accordion effect

This article example shares the specific code of ...

Network configuration of Host Only+NAT mode under VirtualBox

The network configuration of Host Only+NAT mode u...

How to create a responsive column chart using CSS Grid layout

I have been playing around with charts for a whil...

Specific use of Linux dirname command

01. Command Overview dirname - strip non-director...

Detailed analysis of each stage of nginx's http request processing

When writing the HTTP module of nginx, it is nece...

CSS Standard: vertical-align property

<br />Original text: http://www.mikkolee.com...

Complete steps for using Echarts and sub-packaging in WeChat Mini Program

Preface Although the holiday is over, it shows up...

Implementation method of Nginx+tomcat load balancing cluster

The experimental environment is as follows Here y...