Network Diagram

                       

 

ตั้งค่า VPN Server (Mikrotik)

1. ไปที่ IP >> IPsec >> เลือกที่แท็บ Profiles

          1.1 ทำการ Add Profile
          1.2 ทำการตั้งชื่อที่ Name
          1.3 เลือก Hash Algorithms เป็น Sha1
          1.4 เลือก Encryption Algorithm เป็น AES-256 และ DH Group เป็น modp 1024
          1.5 ตั้งค่า Lifetime เป็น 8 ชั่วโมง “08:00:00”
          1.6 กด OK

 

 

2. ไปที่แท็บ Peers และตั้งค่าดั้งนี้

          2.1 กด Add Peer
          2.2 ทำการตั้งชื่อ Peer Name
          2.3 ระบุ Profile ที่เราสร้างไว้จากหัวข้อที่ 1
          2.4 ตั้งค่า Exchange Mode เป็น Main Mode
          2.5 เอาติ๊กที่ Send INITIAL_CONTACT ออก
          2.6 กด OK

 

 

3. ไปที่แท็บ Identities และทำการตั้งค่าดังนี้

          3.1 Add Identity profile
          3.2 เลือก Peer ที่เราสร้างไว้ที่หัวข้อ 2
          3.3 ระบุรหัส Pre Shared Key ที่ Secret
          3.4 กด OK

 

 

4. ไปที่แท็บ Proposals และตั้งค่าดังนี้

          4.1 Add Proposal Profile
          4.2 ตั้งชื่อที่ Name
          4.3 ระบุ Auth Algorithms เป็น Sha1
          4.4 ระบุ Encr Algorithms เป็น AES-256 cbc
          4.5 ตั้ง Lifetime เป็น 1 ชั่วโมง
          4.6 เลือก PFS Group เป็น “none”
          4.7 กด OK

 

 

5. ไปที่แท็บ Policies และตั้งค่าดังนี้

          5.1 Add Policy Profile
          5.2 เลือก Peer ที่เราสร้างไว้ที่หัวข้อ 2 และ ติ๊กใช้งาน Tunnel
          5.3 ระบุ Src Address (LAN ฝั่ง Mikrotik) และ Dst Address (LAN ฝั่ง Peplink)

 

 

          5.4 ไปที่แท็บ Action ของ Policy Profile
          5.5 เลือก Action เป็น encrypt
          5.6 เลือก IPsec Protocols เป็น esp
          5.7 ระบุ Proposal ที่เราสร้างไว้ที่หัวข้อ 4
          5.8 กด OK

 

 

6. ไปที่เมนู IP >> Firewall >> ไปที่แท็บ NAT

          6.1 Add NAT Rule
          6.2 ระบุ Src Address (LAN ฝั่ง Mikrotik) และ Dst Address (LAN ฝั่ง Peplink)

 

 

          6.3 ไปที่แท็บ Action ของ NAT Rule
          6.4 ระบุ Action เป็น accept
          6.5 กด OK

 

 

ตั้งค่า VPN Client (Peplink)
7. ไปที่ Network >> IPsec VPN >> สร้าง Profile ที่ New Profile

 

8. ทำการตั้งค่า IPsec VPN Profile ดังนี้
          8.1 ตั้งชื่อ Name และ ติ๊ก Active เพื่อเปิดงาน
          8.2 เลือก IKEv1
          8.3 ระบุ IP WAN หรือ DDNS ของ Mikrotik
          8.4 ระบุ Local Network(LAN ฝั่ง Peplink) และ Remote Networks(LAN ฝั่ง Mikrotik)
          8.5 เลือก Mode เป็น Main Mode และ ระบุ Preshared Key ให้ตรงกับที่ตั้งค่าไว้ที่ Mikrotik
          8.6 ตั้งค่า Phase 1 – Proposal เป็น AES-256 & SHA1
                               – DH Group เป็น Group 2 (modp 1024)
                               – SA Lifetime เป็น 28800 sec
          8.7 ตั้งค่า Phase 2 – Proposal เป็น AES-256 & SHA1
                               – PES Group เป็น None
                               – SA Lifetime เป็น 3600 sec
          8.8 ระบุ WAN ที่ใช้ในการเชื่อมต่อ
          8.9 กด Save และ Apply

 

 

9. ตรวจสอบ Status VPN
บน Mikrotik ให้ไปที่ IP >> IPsec >> แท็บ Active Peers

บน Peplink ไปที่ Status >> IPsec VPN