Skip to content
Nhan Le

Nhan Le

Technology Information

  • Home
  • Security
  • Blogs
  • Home
  • Docker
  • Docker Wireguard VPN

Docker Wireguard VPN

Posted on November 2, 2022November 25, 2022 By admin 28 Comments on Docker Wireguard VPN
Docker, VPN

Trong bài hướng dẫn này mình sẽ hướng dẫn mọi người thiết lập Docker Wireguard VPN dựa trên nền tảng công nghệ Docker. Thông qua hướng dẫn bên dưới ta có thể triển khai nhanh máy chủ VPN Server dùng để truy cập vào trong hệ thống mạng nội bộ.

– Bước 1: Chuẩn bị máy chủ ảo Ubuntu server đóng vai trò là docker hosts và cài đặt docker container

root@nhanle:~# cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION=”Ubuntu 20.04.3 LTS”

root@nhanle:~# uname -r
5.4.0-94-generic

root@nhanle:~# sudo apt update
root@nhanle:~# sudo apt install apt-transport-https ca-certificates curl software-properties-common
root@nhanle:~# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
root@nhanle:~# sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable”
root@nhanle:~# sudo apt-cache policy docker-ce
root@nhanle:~# sudo apt install docker-ce docker-compose

– Bước 2: Thực hiện tạo file cấu hình “docker-compose.yml” cho dịch vụ Wireguard VPN

nhanle@gitlab:/opt$ sudo mkdir /opt/WireGuard
nhanle@gitlab:/opt$ sudo vim docker-compose.yml

version: “3.8”
services:
  wg-easy:
    environment:
      # Phần nội dung phải khai báo
      # Khai báo tên miền wireguard
      – WG_HOST=nhanlan.me
      # Tùy chỉnh lại
      – PASSWORD=password
      # – WG_PORT=51820
      # – WG_DEFAULT_ADDRESS=10.8.0.x
      # – WG_DEFAULT_DNS=1.1.1.1
      # – WG_ALLOWED_IPS=192.168.15.0/24, 10.0.1.0/24
    image: weejewel/wg-easy
    container_name: wg-easy
    volumes:
      – .:/etc/wireguard
    ports:
      – “51820:51820/udp”
      – “51821:51821/tcp”
    restart: unless-stopped
    cap_add:
      – NET_ADMIN
      – SYS_MODULE
    sysctls:
      – net.ipv4.ip_forward=1
      – net.ipv4.conf.all.src_valid_mark=1
– Bước 3: Thực hiện khởi động Wireguard VPN và thực hiện một số câu lệnh kiểm tra nội dung
root@gitlab:/opt/WireGuard# docker-compose up –detach
root@gitlab:/opt/WireGuard# docker image ls | grep wg-easy
root@gitlab:/opt/WireGuard# docker-compose images

– Bước 4: Truy cập vào đường link web quản trị  Wireguard VPN “http://nhanle.local:51821” và thực hiện tạo profile cho người dùng

Post navigation

Next Post: INOTIFY ❯

28 thoughts on “Docker Wireguard VPN”

  1. Pingback: hello world
  2. Pingback: levitra price
  3. Pingback: antibiotics online purchase
  4. Pingback: stromectol price south africa
  5. Pingback: doxycycline monohydrate
  6. Pingback: remeron for sleep in kids
  7. Pingback: antibiotics for dogs
  8. Pingback: sertraline hcl 25 mg tablet
  9. Pingback: stendra generic
  10. Pingback: lasix medicine price
  11. Pingback: lasix for dogs cost
  12. Pingback: rifampicine
  13. Pingback: dexlansoprazole 30 mg generic
  14. Pingback: oral vibramycin
  15. Pingback: doxycycline hyclate for sinus infection
  16. Pingback: vidalista 2.5 mg tadalafil
  17. Pingback: viagra reviews 2022
  18. Pingback: cialis daily prescription
  19. Pingback: pancrelipase conversion
  20. Pingback: famotidine sleepiness
  21. Pingback: buy dapoxetine usa
  22. Pingback: dapoxetine 30mg cvs
  23. Pingback: sémaglutide injection prix mahwah
  24. Pingback: semaglutid tablet
  25. Pingback: goodrx propecia coupon
  26. Pingback: doxycycline dosage for uti medscape
  27. Pingback: doxycycline 100mg dosage acne
  28. Pingback: does doxycycline remove acne

Comments are closed.

Recent Posts

  • Kiểm tra băng thông kết nối
  • INOTIFY
  • Docker Wireguard VPN

Recent Comments

  1. does doxycycline remove acne on Docker Wireguard VPN
  2. doxycycline hyclate 100mg cause heartburn on INOTIFY
  3. doxycycline 100mg dosage acne on Docker Wireguard VPN
  4. doxycycline dosage for uti medscape on Docker Wireguard VPN
  5. proscar dose for bph on Kiểm tra băng thông kết nối

Archives

  • November 2023
  • November 2022

Categories

  • Docker
  • Security
  • Uncategorized
  • VPN

  • Home
  • Security
  • Blogs

Copyright © 2026 Nhan Le.

Theme: Oceanly by ScriptsTown