บทความนี้อธิบายวิธีตั้งค่า Source NAT (SNAT) บน Sangfor NGAF/NSF เพื่อแปลง Source IP ของ Traffic ขาออก ซึ่งจำเป็นสำหรับให้ LAN Client สามารถออก Internet ได้
Source NAT คืออะไร
Source NAT (SNAT) คือการแปลง Source IP Address ของ Packet ขาออก จาก Private IP (เช่น 192.168.x.x) เป็น Public IP ของ WAN Interface เพื่อให้สามารถสื่อสารกับ Internet ได้
ขั้นตอนการตั้งค่า
1. สร้าง SNAT Rule
ไปที่ Policies > NAT > Source NAT กด Add
2. กำหนดเงื่อนไข Match
- Source Zone: LAN (Zone ที่ Client อยู่)
- Destination Zone: WAN
- Source Address: เลือก Network Object ของ LAN Subnet หรือ Any
- Destination Address: Any (ทุก Destination)
- Service: Any หรือเลือก Service ที่ต้องการ
3. กำหนด Translation
-
Translated Source Address: เลือกหนึ่งในวิธีต่อไปนี้:
- Outgoing Interface IP: ใช้ IP ของ WAN Interface (เหมาะกับ WAN เดียว)
- IP Pool: กำหนดช่วง IP สำหรับ NAT (เหมาะกับหลาย Public IP)
- Specific IP: กำหนด IP เฉพาะสำหรับ NAT
4. กด OK เพื่อบันทึก
ตัวอย่าง: LAN ออก Internet
- Source Zone: LAN
- Destination Zone: WAN
- Source Address: 192.168.1.0/24
- Translated Source: Outgoing Interface IP
ผลลัพธ์: Client ใน 192.168.1.0/24 จะออก Internet โดยใช้ WAN IP ของ NGAF
ตัวอย่าง: Server ออก Internet ด้วย IP เฉพาะ
- Source Zone: DMZ
- Destination Zone: WAN
- Source Address: 10.0.0.100 (Server IP)
- Translated Source: 203.0.113.10 (Public IP เฉพาะสำหรับ Server)
หมายเหตุ
- SNAT Rule จะถูกประมวลผลจากบนลงล่าง — Rule ที่อยู่ด้านบนจะ Match ก่อน
- ต้องมี Access Control Policy อนุญาต Traffic จาก LAN → WAN ด้วย มิฉะนั้น Traffic จะถูก Block ก่อนถึง NAT
- หากมีหลาย WAN Interface ควรสร้าง SNAT Rule แยกสำหรับแต่ละ WAN หรือใช้ Outgoing Interface IP
- SNAT ไม่มีผลกับ Traffic ภายใน Zone เดียวกัน
ข้อคิดเห็น
0 ข้อคิดเห็น
โปรด ลงชื่อเข้าใช้ เพื่อแสดงข้อคิดเห็น