WireGuard Next-Gen VPN Engine (RouterOS v7)
สคริปต์ WireGuard VPN Server สำหรับเชื่อมสาขาและรีโมต
สร้างคอนฟิก WireGuard VPN Server สำหรับเชื่อมสาขา (Site-to-Site) หรือรีโมตทำงานจากภายนอก (RoadWarrior) พร้อมระบบสร้างคีย์เข้ารหัสอัตโนมัติ และดาวน์โหลดไฟล์คอนฟิก (.conf) ฝั่ง Client ทันที
เลือกรูปแบบ VPN (Use-Case Presets)
Key Pair Generator
Server Public Key
Client Public Key
Client Private Key (สำหรับใส่ใน Client .conf)
ระบบสร้างคีย์ความปลอดภัยสูง 256-bit อัตโนมัติโดยตรงในเบราว์เซอร์ ปลอดภัย ไม่มีการส่งข้อมูลออกภายนอก
# ======================================================== # MikroTik RouterOS v7 - WireGuard VPN Server Setup # Generated by SIAM-LOGIN (https://www.siamlogin.com) # ======================================================== /interface wireguard add name=wg0 listen-port=13231 comment="WireGuard VPN Server" /ip address add address=10.200.0.1/24 interface=wg0 comment="WireGuard Server IP" /ip firewall filter add chain=input action=accept protocol=udp dst-port=13231 comment="Allow WireGuard VPN Incoming" add chain=forward action=accept in-interface=wg0 comment="Allow WireGuard Traffic Forward" /ip firewall nat add chain=srcnat src-address=10.200.0.0/24 out-interface-list=WAN action=masquerade comment="NAT for WireGuard Clients" # หมายเหตุ: เมื่อรันคำสั่งด้านบนแล้ว ให้ตรวจสอบ Public Key ของ Router ที่ /interface wireguard print # จากนั้นสร้าง Peer สำหรับ Client 1: # /interface wireguard peers add interface=wg0 public-key="[ใส่ Client Public Key]" allowed-address=10.200.0.2/32