差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版 前次修改
下次修改
前次修改
tech:wireguard [2023/11/15 23:34] jonathantech:wireguard [2024/04/12 20:53] (目前版本) – [host Alpine 升級到 3.19 之後啟動異常解決方法] jonathan
行 21: 行 21:
       - PASSWORD=myPassword       - PASSWORD=myPassword
       - WG_PORT=51820       - WG_PORT=51820
-      - WG_DEFAULT_ADDRESS=10.8.0.x+      - WG_DEFAULT_ADDRESS=10.13.12.x
       - WG_DEFAULT_DNS=192.168.11.6       - WG_DEFAULT_DNS=192.168.11.6
       # - WG_MTU=1420       # - WG_MTU=1420
行 33: 行 33:
     container_name: wg-easy     container_name: wg-easy
     volumes:     volumes:
-      - ./ect_wireguard:/etc/wireguard+      - ./etc_wireguard:/etc/wireguard
     ports:     ports:
       - "51820:51820/udp"       - "51820:51820/udp"
行 49: 行 49:
 </cli> </cli>
   * 可以使用瀏覽器 http://server-ip:51821 輸入設定密碼(myPassword)登入管理介面進行 vpn 使用者管理   * 可以使用瀏覽器 http://server-ip:51821 輸入設定密碼(myPassword)登入管理介面進行 vpn 使用者管理
 +  * 詳細設定參數請參考 - https://github.com/wg-easy/wg-easy#options
  
 ==== 修改 Listen Port ==== ==== 修改 Listen Port ====
行 62: 行 63:
 </file> </file>
  
-===== 採用 linuxserver/wireguard 版本 =====+===== FAQ ===== 
 +  - host Alpine 升級到 3.19 之後啟動時 log 出現 <cli> 
 +
 +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. 
 +
 +</cli> 
 +    * Ans : 需要在 host (Alpine 3.19) 執行以下指令<cli> 
 +modprobe ip_tables 
 +echo 'ip_tables' >> /etc/modules 
 +</cli>並重新開機即可解決 
 +    * 參考 - https://github.com/wg-easy/wg-easy/discussions/976  
 + 
 +===== 採用 linuxserver/wireguard 版本(無 WebUI) =====
   * 採用 [[https://hub.docker.com/r/linuxserver/wireguard|linuxserver/wireguard]] 的 docker image    * 採用 [[https://hub.docker.com/r/linuxserver/wireguard|linuxserver/wireguard]] 的 docker image 
   * 執行以下語法 <cli>   * 執行以下語法 <cli>
  • tech/wireguard.1700062479.txt.gz
  • 上一次變更: 2023/11/15 23:34
  • jonathan