Monday, July 9, 2012

VPN Site to Site ด้วย Endian Firewall 2.5.1

คุณผู้อ่าน... ท่านที่เคารพ

อันเนื่องมาจาก project ที่นี่ จึงขอบันทึกการ setup ด้วย Endian Firewall 2.5.1 เป็นตัวอย่างไว้




ข้อกำหนด คอมพิวเตอร์ทั้งสอง net ตัองสื่อสารถึงกันได้ในระดับ client

EFW : 192.168.0.15 เป็น VPN Server
EFW : 192.168.1.254 เป็น VPN Client GW2GW
ทั้งสองฝั่งใช้ internet แบบ Dynamic ไม่ fixed IP ใช้ dyndns เพื่ออ้างอิงชื่อ และ setup router ให้เป็น bridge mode

เมื่อเข้าใจ network diagram แล้ว กำหนดค่าต่าง ๆ ได้ดังนี้

ที่ EFW : 192.168.0.15

VPN -> OpenVPN server


OpenVPN server -> Tick

Dynamic IP pool start address: 192.168.0.110

Dynamic IP pool end address: 192.168.0.120

Note : จะต้องกำหนดให้ EFW ให้บริการ DHCP ด้วย


download CA certificate เพื่อเตรียมไป Import เข้าที่เครื่อง EFW : 192.168.1.254

----- > ตั้งชื่อไว้เพื่อการ authen ด้วย OpenVPN


OpenVPN -> Accounts




Username: servertoserver

Password : mrtconsult

Verify password :
Client routing

Direct all client traffic through the VPN server : Tick

Push only global options to this client -> Tick

Network behide client : 192.168.1.0/24


OpenVPN - Advanced



Port 1194

Protocol UDP

Block DHCP responses comming from tunnel -> Tick

Don't block traffic between clients  -> Tick

Allow multiple connections from one account -> No Tick

Global push options

Push these network -> Enable 192.168.0.0

Push these nameservers -> Enable 192.168.0.15

Push domain -> Enable mrt.local

Authentication type

PSK (username/password)


ที่ EFW 192.168.1.254

VPN -> OpenVPN client(Gw2Gw)

Add tunnel configuration

Connection name :
Connect to:
Upload certificate
Username : servertoserver
Password: xxxxx
Remark: User for Net to Net

Device type : TAP
Connection type: Routed
Block DHCP responses coming from tunnel: Tick
Use LZO compression: Tick
Protocol: UDP



OK ครับ ด้วย config แบบนี้ client ทั้้งสองฝั่ง ping หากันได้ browse ไฟล์เซิร์ฟเวอร์จาก 192.168.1.0 ไปที่ 192.168.0.100 ได้ พร้อมกับเรียกใช้ mail server ได้ด้วย

จบ project ... เก็บเงินได้แล้ว

0 comments:

Twitter Delicious Facebook Digg Stumbleupon Favorites More