[RouterOS] 建置 L2TP over IPSec VPN Server

RouterOS version: 6.39.2

四個步驟:

  1. 建立 VPN 網段
  2. 建立給 L2TP 使用的 profile
  3. 建立 L2TP 連線用的帳號密碼
  4. 啟動 L2TP Server

建立 VPN 網段:

/ip pool
add name=vpn_pool ranges=10.0.0.1-10.0.0.100
  • VPN 網段可以跟內網網段分開, 也可以用同一網段。

建立給 L2TP 使用的 profile:

/ppp profile
add local-address=192.168.88.1 name=l2tp_profile remote-address=vpn_pool use-encryption=required
  • name: l2tp_profile。
  • local-address: 輸入你的 L2TP Server IP,也就是你的 RouterBoard IP。
  • remote-address: 輸入你要分配給連入的 L2TP 連線的 IP,如果同一時間只會有一個 L2TP 連入,那可以直接填 IP 位址就好,否則可以使用 IP Pool 給予網段。

建立 L2TP 連線用的帳號密碼:

/ppp secret
add name=帳號 password=密碼 profile=l2tp_profile service=l2tp

啟動 L2TP Server:

/interface l2tp-server server
set default-profile=l2tp_profile enabled=yes ipsec-secret=秘鑰 use-ipsec=yes
  • default-profile: 輸入前面建立的 profile name,也就是 l2tp_profile。
  • ipsec-secret: 預共用密鑰。可自設,Clinet 端連線時需要輸入。

Win7 L2TP 連線 Security 頁面設定:

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *