诺甘农圆盘

参考资料收集库

用户工具

站点工具


linux:softethervpn

SoftEtherVPN的docke用法

docker-compose.yaml 文件如下,如果使用官方的范例会无法映射本地网卡网络。

version: '3'

services:
  softether:
    image: softethervpn/vpnserver:latest
    cap_add:
      - NET_ADMIN
    restart: always
    ports:
      - 53:53
      - 443:443
      - 5443:5443
      - 992:992
      - 1194:1194/udp
      - 5555:5555
      - 500:500/udp
      - 4500:4500/udp
      - 1701:1701/udp
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
      - "./softether_data:/mnt"
      - "./softether_log:/root/server_log"
      - "./softether_packetlog:/root/packet_log"
      - "./softether_securitylog:/root/security_log"

如果需要映射本地局域网,需要把宿主机的网卡整个映射进去,把单个映射端口改为network_mode: host,修改如下:

version: '3'

services:
  softether:
    image: softethervpn/vpnserver:latest
    cap_add:
      - NET_ADMIN
    restart: always
    network_mode: host
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
      - "./softether_data:/mnt"
      - "./softether_log:/root/server_log"
      - "./softether_packetlog:/root/packet_log"
      - "./softether_securitylog:/root/security_log"

官方docker镜像地址:https://github.com/SoftEtherVPN/SoftetherVPN-docker

linux/softethervpn.txt · 最后更改: 2024/10/30 08:42 由 packingbox