目錄表

在 Alpine 內安裝 WireGuard VPN (Docker)

採用 weejewel/wg-easy 版本(包含 WebUI)

修改 Listen Port

FAQ

  1. host Alpine 升級到 3.19 之後啟動時 log 出現

    :
    iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT;
    modprobe: can't change directory to '/lib/modules': No such file or directory
    modprobe: can't change directory to '/lib/modules': No such file or directory
    iptables v1.8.3 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
    Perhaps iptables or your kernel needs to be upgraded.
    :

採用 linuxserver/wireguard 版本(無 WebUI)

修改 Listen Port

建立指定 Client 的憑證

刪除特定 Client 的憑證

顯示目前 Client 憑證與連線狀態

  • 目前由修改 docker-compose.yml 用重啟 docker compose 命令的維運方式要注意:
    1. 新增刪除 Client 修改 docker-compose.yml 都需要重啟 docker compose 才能生效
    2. 重啟過程的這幾秒鐘 WireGuard 會斷線無法提供服務

後續須持續了解項目

參考網址