"ในโลกที่ปกคลุมไปด้วยอินเตอร์เนตบรอดแบนด์ VPN หรือ Virtual Private Network กำลังจะทำให้แอปพลิเคชั่นในสำนักงานสามารถติดตามคุณไปได้ทุกที่ OpenVPN คือโซลูชั่นที่จะทำให้ฝันของคุณเป็นจริง"
http://www.math.ucla.edu/~jimc/documents/vpn.html สำหรับบทความนี้จะพูดถึงการใช้งาน OpenVPN โดยให้ VPN Server ทำงานบนลีนุกซ์และใช้ VPN Client ซึ่งทำงานอยู่บนวินโดวส์ ข้อดี สำหรับการทำงานผ่าน TUN ข้อเสีย สำหรับการทำงานผ่าน TUN ข้อดี สำหรับการทำงานผ่าน TAP ข้อเสีย สำหรับการทำงานผ่าน TAP Active Attack คือ ผู้ที่มีความสามารถเข้ามาแทรก หรือเพิ่มเติมแก้ไขข้อมูลระหว่างทางที่เครื่องคอมพิวเตอร์กำลังติดต่อกัน วิธีการป้องกันคือ พิสูจน์ตัวตน ( authentication ) OpenVPN ใช้ HMAC ในการพิสูจน์ตัวตนในการแลกเปลี่ยนแพ็กเก็ต รูปที่ 1 การส่งข้อมูลผ่าน OpenVPN โดยส่งผ่านโพรโตคอลผ่าน UDP หมายเหตุ : โปรโตคอล UDP ได้ที่ http://sites.inka.de/bigred/devel/tcp-tcp.html http://openvpn.sourceforge.net/papers/BLUG-talk/ รูปที่ 2 ผังเน็ตเวิร์กตัวอย่างสำหรับการทดสอบ OpenVPN ข้อมูลเพิ่มเติมจากเน็ตเวิร์กตัวอย่าง
เตรียมแพกเกจก่อนการติดตั้ง
dev tun #dev tap tls-server dh dh1024.pem ca ca.crt cert server.crt key server.key auth-user-pass-verify ./auth-pam.pl via-file #client-disconnect ./logoff.sh #up ./openvpn.up mode server duplicate-cn ifconfig 192.168.100.1 192.168.100.2 #(tun) #ifconfig 192.168.100.1 255.255.255.0 #(tap) ifconfig-pool 192.168.100.100 192.168.100.200 # (tun)IP range for openvpn client #ifconfig-pool 192.168.100.100 192.168.100.200 255.255.255.0 # (tap)IP range fomtu-test tun-mtu 1500 tun-mtu-extra 32 mssfix 1450 ping 10 ping-restart 120 push "ping 10" push "ping-restart 60" push "dhcp-option DOMAIN ccm.com" # push the DNS domain suffix push "dhcp-option DNS 192.168.0.254" # push DNS entries to openvpn client push "dhcp-option WINS 192.168.0.254" # push DNS entries to openvpn client push "route 192.168.0.0 255.255.255.0" # (tun)add route to to protected network push "route 192.168.100.1" # (tun)add route to to protected network #push "route 192.168.0.0 255.255.255.0 192.168.100.1" # (tap)add route to to pro tected network ;user nobody ;group nobody comp-lzo status-version 2 status openvpn-status.log verb 3 หมายเหตุ /usr/share/openvpn/sample-config-files จากตัวอย่างไฟล์ server.conf ข้างต้นจะเห็นเครื่องหมายคอมเมนต์ของการใช้งานผ่าน TAP ในกรณีผู้อ่านต้องการใช้ VPN ผ่าน TAP ให้ทำเครื่องหมายคอมเมนต์ที่ TUN และนำเครื่องหมายคอมเมนต์หน้าบรรทัด TAP ออก inet addr:192.168.100.1 P-t-P:192.168.100.2 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:689 errors:0 dropped:0 overruns:0 frame:0 TX packets:735 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:87131 (85.0 Kb) TX bytes:105585 (103.1 Kb) inet addr:192.168.100.1 Bcast:192.168.100.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1293 errors:0 dropped:0 overruns:0 frame:0 TX packets:1355 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:161389 (157.6 Kb) TX bytes:468689 (457.7 Kb) กรณีที่ระบบของท่านมีไฟล์วอลล์กรุณาให้ไฟร์วอลล์ของท่านเปิดรับ UDP Port 1194 และเปิดรับแพกเก็ตที่มาจากอุปกรณ์ TUN หรือ TAP ด้วย และในกรณีที่ต้องการใช้งานผ่าน Samba อย่าลืมกำหนดให้ Samba รับไอพีแอดเดรสของ VPN Client ด้วย สำหรับตัวอย่างการเปิดไฟร์วอลล์เพื่ออนุญาตการใช้งาน OpenVPN สามารถดูได้ดังนี้ การติดตั้ง VPN Client บนวินโดวส์
หลังจากติดตั้งโปรแกรมเรียบร้อยเราจะได้ Local Connection ที่เป็น TAP-Win32 Adapter สามารถตรวจสอบได้ที่ Network Connections ดังรูปที่ 3 รูปที่ 3 TAP Adapter ถูกสร้างขึ้นหลังจากติดตั้ง OpenVPN ในกรณีที่ติดตั้งแล้วยังไม่ได้ TAP-Win32 Adapter ให้ไปที่เมนู /Start/Openvpn/Add a new TAP-Win32 virtual ethernet adapter dev tun port 1194 remote <ชื่อของ VPN Server หรือจะใช้เป็นไอพีแอดเดรสก็ได้> tls-client auth-user-pass ca ca.crt cert client.crt key client.key mtu-test tun-mtu 1500 tun-mtu-extra 32 mssfix 1450 pull comp-lzo verb 4 รูปที่ 4 ข้อมูล TAP Adapter หลังจากเชื่อมต่อแบบ TUN รูปที่ 5 ข้อมูล TAP Adapter หลังจากเชื่อมต่อแบบ TAP นำ VPN ไปประยุกต์ใช้ แหล่งข้องมูลอ้างอิง http://openvpn.sourceforge.net/howto.html http://openvpn.sourceforge.net/papers/openvpn-101.pdfhttp://www.math.ucla.edu/~jimc/documents/vpn.htmlhttp://www.linuxjournal/article/7949 http://www.sans.org/rr/papers/20/1459.pdf http://fedoranews.org/contributors/florin_andrei/openvpn/ |
OpenVPN เมื่อแอปพลิเคชั่นจะตามคุณไปทุกที่
Posted by Unknown Monday, November 28, 2011การทำ VPN แบบ PPTP Server บน LinkSys RV042
Posted by UnknownPoint to Point Tunneling Protocol (PPTP) อ้างอิง
PPTP เป็นโปรโตคอลสำหรับสร้าง Tunnel ที่ใช้รับส่งข้อมูลผ่านเครือข่ายสาธารณะ เช่น Internet พัฒนาขึ้นโดยกลุ่มบริษัท Microsoft, 3Com และ Ascend Communication โดย PPTP สามารถผนึกเฟรมของข้อมูลได้หลายชนิด เช่น IP, IPX หรือ NetBEUI แล้วส่งเฟรมเหล่านี้ผ่านเฟรม PPP ตามปกติ เมื่อตรวจดูข้อมูลที่ถูกส่งออกไปจะเสมือนกับการรับส่งเฟรม PPP ตามธรรมดาของคอมพิวเตอร์สองระบบ ซึ่งแท้ที่จริงแล้วข้อมูลที่รับส่งอาจจะเป็นเฟรม IP, IPX หรือ NetBEUI ที่คอมพิวเตอร์ทำการรับส่งข้อมูลกันจริงๆก็ได้ เมื่อใช้การเข้ารหัสและการลดข้อมูลเข้าไปอีก การรับส่งข้อมูลก็จะปลอดภัยมากยิ่งขึ้นPPTP จะใช้โปรโตคอล TCP ในการสร้าง Tunnel และแลกเปลี่ยนข้อมูลต่างๆที่เกี่ยวกับ Tunnel และใช้ PPP เป็นตัวรับส่งข้อมูลที่ต้องการติดต่อระหว่างผู้รับและผู้ส่ง ซึ่งการเชื่อมต่อของ PPTP จะมีอยู่สองชนิดแตกต่างกันคือ วิธีแรกใช้ PPTP ติดต่อกันจากผู้รับถึงผู้ส่งตลอดเส้นทาง ส่วนวิธีที่สองใช้ PPTP เฉพาะส่วนที่ติดต่อกับ Internet Service Provider (ISP) ไปยังปลายทางเท่านั้นโดยในกรณีแรก ทั้งผู้รับและผู้ส่งข้อมูลจะมีซอฟต์แวร์ PPTP อยู่ในคอมพิวเตอร์ทั้งคู่ เมื่อคอมพิวเตอร์ต้นทางติดต่อไปยังปลายทางผ่าน ISP ในชั้นแรกจะติดต่อโดยใช้ PPP ตามปกติก่อน หลังจากนั้นเมื่อคอมพิวเตอร์ทั้งสองเชื่อมต่อรับส่งข้อมูลกันได้แล้ว ก็จะตกลงกันรับส่งส่งข้อมูลโดยใช้ PPTP ซึ่งกรณีคอมพิวเตอร์ของ ISP ก็ไม่จำเป็นต้องมีซอฟต์แวร์ PPTP อยู่ และจะไม่ยุ่งเกี่ยวกับคอมพิวเตอร์ของ ISP ในการรับส่งข้อมูลโดยใช้ PPTP ระหว่างต้นทางกับคอมพิวเตอร์ปลายทางเลย
ทราบความหมาย PPTP กันแล้วน่ะครับมาเริ่มการตั้งค่ากันเลย
1. ทำการเชื่อมต่อ linksys RV042 ให้ออกอินเตอร์เน็ต เพื่อให้คอมพิวเตอร์ที่เป็น Public สามารถเชื่อมต่อเข้ามาได้ โดยอินเตอร์เน็ตที่ผมขอใช้บริการเป็นแบบ Static IP (Fix IP ) แต่ถ้าใครไม่เปิดบริการนี้แสดงว่าเป็น Dynamic IP คือ IP ไม่คงที่เปลี่ยนไปเรื่อยๆ ทำให้เราไม่สามารถระบุ IP ที่อยู่ที่แท้จิงได้ ต้องไปสมัครสมาชิกกับผู้ให้บริการ DNS เช่น DYNDNS เป็นต้น ว่ากันง่ายก็คือ บริการที่ทำให้ IP ที่ไม่คงที่ ไปเป็นชื่อ [ Domain Name ] ที่สามารถอ้างอิงบนระบบอินเตอร์เน็ตได้
2.หากเชื่อมต่อเรียบร้อย จะมี IP Address จากผู้ให้บริการ ISP แสดงขึ้นมา ดังรูป
3. ตั้งค่า PPTP Server โดยไปที่ เมนู VPN > PPTP Server ทำเครื่องหมายหน้า Enable PPTP Server ตรง IP Address Range ให้เรากำหนดหมายเลข IP Address ให้กับเครื่องที่ VPN เข้ามาอย่างอัตโนมัติ หมายความว่าไม่ว่าเครื่องใดเชื่อมต่อเข้าจะได้รับ IP Address เหล่านี้ไปครับ ผมตั้งให้เป็น 192.89.1.200 -192.89.1.204 จำนวน 5 IP ครับ พร้อมสร้าง Username และ Password สำหรับการเชื่อมต่อ ดังรูป
4. ไปที่เมนู VPN Pass Through เพื่อเปิดให้โปรโตคอล PPTP ทำงาน การตั้งค่า PPTP Server เสร็จเรียบร้อยน่ะครับ
5. ตั้งค่าการเชื่อมต่อจากเครื่อง Client ในที่นี้ผมใช้ Windows XP ดังนี้ครับ
ไปที่ Network Connections ที่ Create a new connections เลือกเป็น Virtual private Network connection
ตั้งชื่อการเชื่อมต่อ
ใส่ IP Address ที่เราต้องการจะเชื่อมต่อไปหา ก็คือ IP PPTP Server ที่ได้รับจากผู้ให้บริการ ISP ซึ่งขอใช้เป็นแบบ Fix IP
ใส่ UserName และ PassWord ที่เราสร้างไว้ใน PPTP Server
หากเชื่อมต่อได้สามารถดูสถานะการเชื่อต่อได้ดังนี้ จะเห็นว่ามันจ่าย IP Address มาให้ด้วยตรงตามที่เรากำหนด
PPTP เป็นโปรโตคอลสำหรับสร้าง Tunnel ที่ใช้รับส่งข้อมูลผ่านเครือข่ายสาธารณะ เช่น Internet พัฒนาขึ้นโดยกลุ่มบริษัท Microsoft, 3Com และ Ascend Communication โดย PPTP สามารถผนึกเฟรมของข้อมูลได้หลายชนิด เช่น IP, IPX หรือ NetBEUI แล้วส่งเฟรมเหล่านี้ผ่านเฟรม PPP ตามปกติ เมื่อตรวจดูข้อมูลที่ถูกส่งออกไปจะเสมือนกับการรับส่งเฟรม PPP ตามธรรมดาของคอมพิวเตอร์สองระบบ ซึ่งแท้ที่จริงแล้วข้อมูลที่รับส่งอาจจะเป็นเฟรม IP, IPX หรือ NetBEUI ที่คอมพิวเตอร์ทำการรับส่งข้อมูลกันจริงๆก็ได้ เมื่อใช้การเข้ารหัสและการลดข้อมูลเข้าไปอีก การรับส่งข้อมูลก็จะปลอดภัยมากยิ่งขึ้นPPTP จะใช้โปรโตคอล TCP ในการสร้าง Tunnel และแลกเปลี่ยนข้อมูลต่างๆที่เกี่ยวกับ Tunnel และใช้ PPP เป็นตัวรับส่งข้อมูลที่ต้องการติดต่อระหว่างผู้รับและผู้ส่ง ซึ่งการเชื่อมต่อของ PPTP จะมีอยู่สองชนิดแตกต่างกันคือ วิธีแรกใช้ PPTP ติดต่อกันจากผู้รับถึงผู้ส่งตลอดเส้นทาง ส่วนวิธีที่สองใช้ PPTP เฉพาะส่วนที่ติดต่อกับ Internet Service Provider (ISP) ไปยังปลายทางเท่านั้นโดยในกรณีแรก ทั้งผู้รับและผู้ส่งข้อมูลจะมีซอฟต์แวร์ PPTP อยู่ในคอมพิวเตอร์ทั้งคู่ เมื่อคอมพิวเตอร์ต้นทางติดต่อไปยังปลายทางผ่าน ISP ในชั้นแรกจะติดต่อโดยใช้ PPP ตามปกติก่อน หลังจากนั้นเมื่อคอมพิวเตอร์ทั้งสองเชื่อมต่อรับส่งข้อมูลกันได้แล้ว ก็จะตกลงกันรับส่งส่งข้อมูลโดยใช้ PPTP ซึ่งกรณีคอมพิวเตอร์ของ ISP ก็ไม่จำเป็นต้องมีซอฟต์แวร์ PPTP อยู่ และจะไม่ยุ่งเกี่ยวกับคอมพิวเตอร์ของ ISP ในการรับส่งข้อมูลโดยใช้ PPTP ระหว่างต้นทางกับคอมพิวเตอร์ปลายทางเลย
ทราบความหมาย PPTP กันแล้วน่ะครับมาเริ่มการตั้งค่ากันเลย
1. ทำการเชื่อมต่อ linksys RV042 ให้ออกอินเตอร์เน็ต เพื่อให้คอมพิวเตอร์ที่เป็น Public สามารถเชื่อมต่อเข้ามาได้ โดยอินเตอร์เน็ตที่ผมขอใช้บริการเป็นแบบ Static IP (Fix IP ) แต่ถ้าใครไม่เปิดบริการนี้แสดงว่าเป็น Dynamic IP คือ IP ไม่คงที่เปลี่ยนไปเรื่อยๆ ทำให้เราไม่สามารถระบุ IP ที่อยู่ที่แท้จิงได้ ต้องไปสมัครสมาชิกกับผู้ให้บริการ DNS เช่น DYNDNS เป็นต้น ว่ากันง่ายก็คือ บริการที่ทำให้ IP ที่ไม่คงที่ ไปเป็นชื่อ [ Domain Name ] ที่สามารถอ้างอิงบนระบบอินเตอร์เน็ตได้
2.หากเชื่อมต่อเรียบร้อย จะมี IP Address จากผู้ให้บริการ ISP แสดงขึ้นมา ดังรูป
3. ตั้งค่า PPTP Server โดยไปที่ เมนู VPN > PPTP Server ทำเครื่องหมายหน้า Enable PPTP Server ตรง IP Address Range ให้เรากำหนดหมายเลข IP Address ให้กับเครื่องที่ VPN เข้ามาอย่างอัตโนมัติ หมายความว่าไม่ว่าเครื่องใดเชื่อมต่อเข้าจะได้รับ IP Address เหล่านี้ไปครับ ผมตั้งให้เป็น 192.89.1.200 -192.89.1.204 จำนวน 5 IP ครับ พร้อมสร้าง Username และ Password สำหรับการเชื่อมต่อ ดังรูป
4. ไปที่เมนู VPN Pass Through เพื่อเปิดให้โปรโตคอล PPTP ทำงาน การตั้งค่า PPTP Server เสร็จเรียบร้อยน่ะครับ
5. ตั้งค่าการเชื่อมต่อจากเครื่อง Client ในที่นี้ผมใช้ Windows XP ดังนี้ครับ
ไปที่ Network Connections ที่ Create a new connections เลือกเป็น Virtual private Network connection
ตั้งชื่อการเชื่อมต่อ
ใส่ IP Address ที่เราต้องการจะเชื่อมต่อไปหา ก็คือ IP PPTP Server ที่ได้รับจากผู้ให้บริการ ISP ซึ่งขอใช้เป็นแบบ Fix IP
ใส่ UserName และ PassWord ที่เราสร้างไว้ใน PPTP Server
หากเชื่อมต่อได้สามารถดูสถานะการเชื่อต่อได้ดังนี้ จะเห็นว่ามันจ่าย IP Address มาให้ด้วยตรงตามที่เรากำหนด
OK การทำ VPN แบบ PPTP Server บน pfSense
Posted by Unknownต่อจากการทำ VPN แบบ PPTP บน Linksys RV042 วันนี้มาแนะนำการทำ VPN บน pfSense กันต่อเลยน่ะครับ pfSense เป็นระบบที่ใช้ในการจัดการ firewall ให้ง่ายขึ้น พัฒนามาจาก FreeBSD จากที่ทดลองใช้งานจนถึงวันนี้ 1 ปีกว่าๆ ยังไม่เกิดปัญหาใดๆ นับว่าเป็น Open firewall ที่มีความเสถียรตัวหนึ่งเลยที่เดียว โดยส่วนตัวผมทดลองใช้อยู่หลายตัวเหมือนกัน แต่ขอบเขตของความต้องการโดยส่วนตัว pfSense สามารถตอบได้ตรงใจผมได้ดีในขณะนั้น จนวันนี้อะไรๆ มันเปลี่ยน ความต้องการมีมากขึ้นทุกวัน แต่อย่างน้อย pfSense ก็สามารถช่วยเราได้ในระดับหนึ่ง จริงๆแล้วไม่เกี่ยวอะไรกับ VPN หรอก แต่อยากบอกว่า pfSense มีประสิทธิถาพไม่น้อยกว่า open linux ตัวอื่นๆเลย สิ่งสำคัญอยู่ที่การนำไปใช้ และการจัดการที่ดีมากกว่า เข้าเรื่องเลยแล้วกัน การทำ VPN มีธีดังนี้
1. เข้าไปโหมด admin ของ pfSense เลือก เมนู VPN -> PPTP
2. เลือก Enable PPTP Server
Max.Current Connections คือ Client สามารถเชื่อมต่อเข้ามาได้พร้อมกันสูงสุด 16 connections
Server Address คือ IP address ที่ใช้เชื่อมต่อ ของผมเป็นแบบ Fix IP เพื่อให้ Client เชื่อมผ่าน IP นี้เข้ามา
Remote Address Range คือ IP Pool ที่ต้องการจ่ายให้ client ที่เชื่อมต่อเข้ามาแล้ว ให้เริ่มใช้ IP 192.89.0.32 เป็นต้นไป
3. สร้าง User account เลือกที่ Users
4. การสร้าง Network connection ในเครื่อง Client ดูได้
1. เข้าไปโหมด admin ของ pfSense เลือก เมนู VPN -> PPTP
2. เลือก Enable PPTP Server
Max.Current Connections คือ Client สามารถเชื่อมต่อเข้ามาได้พร้อมกันสูงสุด 16 connections
Server Address คือ IP address ที่ใช้เชื่อมต่อ ของผมเป็นแบบ Fix IP เพื่อให้ Client เชื่อมผ่าน IP นี้เข้ามา
Remote Address Range คือ IP Pool ที่ต้องการจ่ายให้ client ที่เชื่อมต่อเข้ามาแล้ว ให้เริ่มใช้ IP 192.89.0.32 เป็นต้นไป
3. สร้าง User account เลือกที่ Users
4. การสร้าง Network connection ในเครื่อง Client ดูได้
เทคโนโลยี VPN คืออะไร
Posted by Unknownเทคโนโลยี VPN คืออะไร
VPN ย่อมาจาก Virtual Private Network เป็นเทคโนโลยีการเชื่อมต่อเครือข่ายนอกอาคาร (WAN - Wide Area Network) เป็นระบบเครือข่ายภายในองค์กร ซึ่งเชื่อมเครือข่ายในแต่ละสาขาเข้าด้วยกัน โดยอาศัย Internet เป็นตัวกลาง มีการทำ Tunneling หรือการสร้างอุโมงค์เสมือนไว้รับส่งข้อมูล มีระบบเข้ารหัสป้องกันการลักลอบใช้ข้อมูล เหมาะสำหรับองค์กรขนาดใหญ่ซึ่งต้องการความคล่องตัวในการติดต่อรับส่งข้อมูลระหว่างสาขา
มีประสิทธิภาพเช่นเดียวกับ Private Network
นอกจากนี้ยังสามารถกำหนดหมายเลข IP เป็นเครือข่ายเดียวกัน และเจ้าหน้าที่ ที่ปฏิบัตินอกบริษัทฯ ยังสามารถ login เข้ามาใช้เครือข่ายภายในองค์กรได้
PN : Private Network คือเครือข่ายภายในของแต่ละบริษัท, Private Network เกิดจากการที่บริษัทต้องการเชื่อมเครือข่ายของแต่ละสาขาเข้าด้วยกัน (กรณีพวกที่เชื่อมต่อด้วย TCP / IP เลขที่ IP ก็จะกำหนดเป็น 10.xxx.xxx.xxx หรือ 192.168.xxx.xxx หรือ 172.16.xxx.xxx) ในสมัยก่อนจะทำการเชื่อมต่อด้วย leased line หลังจากที่เกิดการเติบโตของการใช้งาน Internet และการพัฒนาเทคโนโลยีที่เกี่ยวข้อง การปรับปรุงในเรื่อง ความเร็วของการเชื่อมต่อ ทำให้เกิดแนวคิดในการแทนที่ leased line หรือ Frame Relay ซึ่งมีราคาแพง ด้วย Internet ที่มีราคาถูกกว่า แล้วตั้งชื่อว่า Virtual Private Network
และจากการที่มีคนได้กำหนดความหมายของ VPN เป็นภาษาอังกฤษไว้ว่า "VPN is Private Communications Network Existing within a Shared or Public network Especially the Internet" จะสามารถสรุปความหมาย ได้ดังนี้
- เทคโนโลยี VPN จะทำการเชื่อมต่อองค์ประกอบข้อมูลและทรัพยากรต่างๆ ของระบบเครือข่ายหนึ่ง ให้เข้ากับระบบเครือข่ายหนึ่ง
- เทคโนโลยี VPN จะทำงานโดยยอมให้ผู้ใช้งานสร้างท่ออุโมงค์ เสมือนเพื่อใช้ในการรับส่งข้อมูลผ่านระบบ เครือข่ายอินเตอร์เน็ต
- ส่วนประกอบที่สำคัญหรือหัวใจหลักในการทำ VPN ก็คือการใช้งานอินเตอร์เน็ต
เทคโนโลยี วีพีเอ็นเปรียบเสมือนการสร้างอุโมงค์เพื่อการสื่อสาร
ทำไมถึงต้องใช้ VPN?
เนื่องจากปัจจุบันการติดต่อสื่อสารถือว่าเป็นสิ่งที่มีความจำเป็นมากขึ้นเรื่อยๆ โดยถ้าเราต้องการการเชื่อมต่อที่มีประสิทธิภาพ มีความปลอดภัยระหว่าง Network บริการที่ดีที่สุดคือ การเช่าสายสัญญาณ (leased line) ซึ่งจะทำการเชื่อมต่อระบบเน็ตเวิร์คของเราด้วยการใช้สายสัญญาณตรงสู่ปลายทาง ทำให้มีความปลอดภัยสูงเพราะไม่ต้องมีการใช้สื่อกลางร่วมกับผู้อื่น และมีความเร็วคงที่ แต่การเช่าสาสัญญาณนั้นใข้อเสียคือ ค่าใช้จ่ายในการใช้บริการนั้นสูงมาก เมื่อเทียบกับความเร็วที่ได้รับ ซึ่งบริษัทขนาดเล็กนั้นคงไม่สามารถทำได้
เทคโนโลยี VPN ได้เข้ามาเป็นอีกทางเลือกหนึ่ง เนื่องจากได้ใช้สื่อกลางคือ Internet ที่มีการติดตั้งอยู่อย่างแพร่หลายเข้ามาสร้างระบบเน็ตเวิร์คจำลอง โดยมีการสร้างอุโมงค์ข้อมูล (Tunnel) เชื่อมต่อกันระหว่างต้นทางกับปลายทาง ทำให้เสมือนว่าเป็นระบบเน็ตเวิร์คเดียวกัน สามารถส่งข้อมูลต่างๆที่ระบบเน็ตเวิร์คทำได้ โดยข้อมูลที่ส่งนั้นจะถูกส่งผ่านไปในอุโมงค์ข้อมูล ทำให้มีความปลอดภัยสูง ใกล้เคียงกับ leased line แต่ค่าใช้จ่าในการทำ VPN นั้นต่ำกว่าการเช่าสายสัญาณมาก
pfSense 2.0 Release Now Available!
Posted by Unknownในที่สุดเวอร์ชั่น 2.0 Release ก็ออกมาสักที หลักจากที่รอคอยมานานนับปี โดยเวอร์ชั่นดังกล่าวมี Feature ที่เปลี่ยนไปดังนี้
Operating System
Based on FreeBSD 8.1 release.
i386 and amd64 variants for all install types (full install, nanobsd/embedded, etc.)
USB memstick installer images available
Interfaces
GRE tunnels
GIF tunnels
3G support
Dial up modem support
Multi-Link PPP (MLPPP) for bonding PPP connections (ISP/upstream must also support MLPPP)
LAGG Interfaces
Interface groups
IP Alias type Virtual IPs
IP Alias VIPs can be stacked on CARP VIPs to go beyond the 255 VHID limit in deployments that need very large numbers of CARP VIPs.
QinQ VLANs
Can use Block Private Networks / Block Bogon Networks on any interface
All interfaces are optional except WAN
All interfaces can be renamed, even LAN/WAN
Bridging enhancements – can now control all options of if_bridge, and assign bridge interfaces
Gateways/Multi-WAN
Gateways, including dynamic gateways, are specified under System > Routing
Gateways can have custom monitor IPs
Gateways can have a custom weight, allowing load balancing to have ratios between WANs of different speeds
Gateways can have custom latency, loss, and downtime trigger levels.
Gateway monitoring via icmp is now configurable.
You can have multiple gateways per interface
Multi-WAN is now handled via gateway groups
Gateway groups can include multiple tiers with any number of gateways on each, for complex failover and load balancing scenarios.
General Web GUI
Set to HTTPS by default, HTTP redirects to HTTPS port
Dashboard and widgets added
System > Advanced screen split into multiple tabs, more options available.
SMTP email alerts and growl alerts
New default theme – pfsense_ng
Some community-contributed themes added
Contextual help available on every page in the web interface, linking to a webpage containing help and documentation specific to that page.
Help menu for quick access to online resources (forum, wiki, paid support, etc.)
Aliases
Aliases may be nested (aliases in aliases)
Alias autocomplete is no longer case sensitive
IP Ranges in Aliases
More Alias entries supported
Bulk Alias importing
URL Aliases
URL Table Aliases – uses a pf persist table for large (40,000+) entry lists
Firewall
Traffic shaper rewritten – now handles any combination of multi-WAN and multi-LAN interfaces. New wizards added.
Layer7 protocol filtering
EasyRule – add firewall rules from log view (and from console!)
Floating rules allow adding non-interface specific rules
Dynamically sized state table based on amount of RAM in the system
More Advanced firewall rule options
FTP helper now in kernel
TFTP proxy
Schedule rules are handled in pf, so they can use all the rule options.
State summary view, report shows states grouped by originating IP, destination IP, etc.
NAT
All of the NAT screens were updated with additional functionality
Port forwards can now handle create/update associated firewall rules automatically, instead of just creating unrelated entries.
Port forwards can optionally use “rdr pass” so no firewall rule is needed.
Port forwards can be disabled
Port forwards can be negated (“no rdr”)
Port forwards can have source and destination filters
NAT reflection improvements, including NAT reflection for 1:1 NAT
Per-entry NAT reflection overrides
1:1 NAT rules can specify a source and destination address
1:1 NAT page redesigned
Outbound NAT can now translate to an address pool (Subnet of IPs or an alias of IPs) of multiple external addresses
Outbound NAT rules can be specified by protocol
Outbound NAT rules can use aliases
Improved generation of outbound NAT rules when switching from automatic to manual.
IPsec
Multiple IPsec p2′s per p1 (multiple subnets)
IPsec xauth support
IPsec transport mode added
IPsec NAT-T
Option to push settings such as IP, DNS, etc, to mobile IPsec clients (mod_cfg)
Mobile IPsec works with iOS and Android (Certain versions, see Mobile IPsec on 2.0)
More Phase 1/2 options can be configured, including the cipher type/strength
ipsec-tools version 0.8
User Manager
New user manager, centralizing the various user configuration screens previously available.
Per-page user access permissions for administrative users
Three built-in authentication types – local users, LDAP and RADIUS.
Authentication diagnostics page
Certificate Manager
Certificate manager added, for handling of IPsec, web interface, user, and OpenVPN certificates.
Handles creation/import of Certificate Authorities, Certificates, Certificate Revocation lists.
Eliminates the need for using command line tools such as EasyRSA for managing certificates.
OpenVPN
OpenVPN wizard guides through making a CA/Cert and OpenVPN server, sets up firewall rules, and so on. Greatly simplifies the process of creating a remote access OpenVPN server.
OpenVPN filtering – an OpenVPN rules tab is available, so OpenVPN interfaces don’t have to be assigned to perform filtering.
OpenVPN client export package – provides a bundled Windows installer with certificates, Viscosity export, and export of a zip file containing the user’s certificate and configuration files.
OpenVPN status page with connected client list — can also kill client connections
User authentication and certificate management
RADIUS and LDAP authentication support
Captive Portal
Voucher support added
Multi-interface capable
Pass-through MAC bandwidth restrictions
Custom logout page contents can be uploaded
Allowed IP addresses bandwidth restrictions
Allowed IP addresses supports IP subnets
“Both” direction added to Allowed IP addresses
Pass-through MAC Auto Entry – upon successful authentication, a pass-through MAC entry can be automatically added.
Ability to configure calling station RADIUS attributes
Wireless
Virtual AP (VAP) support added
more wireless cards supported with the FreeBSD 8.1 base
Server Load Balancing
relayd and its more advanced capabilities replace slbd.
Other
L2TP VPN added
DNS lookup page added
PFTop and Top in GUI – realtime updates
Config History now includes a diff feature
Config History has download buttons for prior versions
Config History has mouseover descriptions
CLI filter log parser (/usr/local/bin/filterparser)
Switched to PHP 5.2.x
IGMP proxy added
Multiple Dynamic DNS account support, including full multi-WAN support and multi-accounts on each interface.
DynDNS Account Types supported are:
DNS-O-Matic
DynDNS (dynamic)
DynDNS (static)
DynDNS (custom)
DHS
DyNS
easyDNS
No-IP
ODS.org
ZoneEdit
Loopia
freeDNS
DNSexit
OpenDNS
Namecheap.com
More interface types (VPNs, etc) available for packet capture
DNS Forwarder is used by the firewall itself for DNS resolution (configurable) so the firewall benefits from faster resolution via multiple concurrent queries, sees all DNS overrides/DHCP registrations, etc.
DHCP Server can now handle arbitrary numbered options, rather than only options present in the GUI.
Automatic update now also works for NanoBSD as well as full installs
More configuration sections can be synchronized via XMLRPC between CARP nodes.
Download New Installation
pfSense Upgrade Guide
Operating System
Based on FreeBSD 8.1 release.
i386 and amd64 variants for all install types (full install, nanobsd/embedded, etc.)
USB memstick installer images available
Interfaces
GRE tunnels
GIF tunnels
3G support
Dial up modem support
Multi-Link PPP (MLPPP) for bonding PPP connections (ISP/upstream must also support MLPPP)
LAGG Interfaces
Interface groups
IP Alias type Virtual IPs
IP Alias VIPs can be stacked on CARP VIPs to go beyond the 255 VHID limit in deployments that need very large numbers of CARP VIPs.
QinQ VLANs
Can use Block Private Networks / Block Bogon Networks on any interface
All interfaces are optional except WAN
All interfaces can be renamed, even LAN/WAN
Bridging enhancements – can now control all options of if_bridge, and assign bridge interfaces
Gateways/Multi-WAN
Gateways, including dynamic gateways, are specified under System > Routing
Gateways can have custom monitor IPs
Gateways can have a custom weight, allowing load balancing to have ratios between WANs of different speeds
Gateways can have custom latency, loss, and downtime trigger levels.
Gateway monitoring via icmp is now configurable.
You can have multiple gateways per interface
Multi-WAN is now handled via gateway groups
Gateway groups can include multiple tiers with any number of gateways on each, for complex failover and load balancing scenarios.
General Web GUI
Set to HTTPS by default, HTTP redirects to HTTPS port
Dashboard and widgets added
System > Advanced screen split into multiple tabs, more options available.
SMTP email alerts and growl alerts
New default theme – pfsense_ng
Some community-contributed themes added
Contextual help available on every page in the web interface, linking to a webpage containing help and documentation specific to that page.
Help menu for quick access to online resources (forum, wiki, paid support, etc.)
Aliases
Aliases may be nested (aliases in aliases)
Alias autocomplete is no longer case sensitive
IP Ranges in Aliases
More Alias entries supported
Bulk Alias importing
URL Aliases
URL Table Aliases – uses a pf persist table for large (40,000+) entry lists
Firewall
Traffic shaper rewritten – now handles any combination of multi-WAN and multi-LAN interfaces. New wizards added.
Layer7 protocol filtering
EasyRule – add firewall rules from log view (and from console!)
Floating rules allow adding non-interface specific rules
Dynamically sized state table based on amount of RAM in the system
More Advanced firewall rule options
FTP helper now in kernel
TFTP proxy
Schedule rules are handled in pf, so they can use all the rule options.
State summary view, report shows states grouped by originating IP, destination IP, etc.
NAT
All of the NAT screens were updated with additional functionality
Port forwards can now handle create/update associated firewall rules automatically, instead of just creating unrelated entries.
Port forwards can optionally use “rdr pass” so no firewall rule is needed.
Port forwards can be disabled
Port forwards can be negated (“no rdr”)
Port forwards can have source and destination filters
NAT reflection improvements, including NAT reflection for 1:1 NAT
Per-entry NAT reflection overrides
1:1 NAT rules can specify a source and destination address
1:1 NAT page redesigned
Outbound NAT can now translate to an address pool (Subnet of IPs or an alias of IPs) of multiple external addresses
Outbound NAT rules can be specified by protocol
Outbound NAT rules can use aliases
Improved generation of outbound NAT rules when switching from automatic to manual.
IPsec
Multiple IPsec p2′s per p1 (multiple subnets)
IPsec xauth support
IPsec transport mode added
IPsec NAT-T
Option to push settings such as IP, DNS, etc, to mobile IPsec clients (mod_cfg)
Mobile IPsec works with iOS and Android (Certain versions, see Mobile IPsec on 2.0)
More Phase 1/2 options can be configured, including the cipher type/strength
ipsec-tools version 0.8
User Manager
New user manager, centralizing the various user configuration screens previously available.
Per-page user access permissions for administrative users
Three built-in authentication types – local users, LDAP and RADIUS.
Authentication diagnostics page
Certificate Manager
Certificate manager added, for handling of IPsec, web interface, user, and OpenVPN certificates.
Handles creation/import of Certificate Authorities, Certificates, Certificate Revocation lists.
Eliminates the need for using command line tools such as EasyRSA for managing certificates.
OpenVPN
OpenVPN wizard guides through making a CA/Cert and OpenVPN server, sets up firewall rules, and so on. Greatly simplifies the process of creating a remote access OpenVPN server.
OpenVPN filtering – an OpenVPN rules tab is available, so OpenVPN interfaces don’t have to be assigned to perform filtering.
OpenVPN client export package – provides a bundled Windows installer with certificates, Viscosity export, and export of a zip file containing the user’s certificate and configuration files.
OpenVPN status page with connected client list — can also kill client connections
User authentication and certificate management
RADIUS and LDAP authentication support
Captive Portal
Voucher support added
Multi-interface capable
Pass-through MAC bandwidth restrictions
Custom logout page contents can be uploaded
Allowed IP addresses bandwidth restrictions
Allowed IP addresses supports IP subnets
“Both” direction added to Allowed IP addresses
Pass-through MAC Auto Entry – upon successful authentication, a pass-through MAC entry can be automatically added.
Ability to configure calling station RADIUS attributes
Wireless
Virtual AP (VAP) support added
more wireless cards supported with the FreeBSD 8.1 base
Server Load Balancing
relayd and its more advanced capabilities replace slbd.
Other
L2TP VPN added
DNS lookup page added
PFTop and Top in GUI – realtime updates
Config History now includes a diff feature
Config History has download buttons for prior versions
Config History has mouseover descriptions
CLI filter log parser (/usr/local/bin/filterparser)
Switched to PHP 5.2.x
IGMP proxy added
Multiple Dynamic DNS account support, including full multi-WAN support and multi-accounts on each interface.
DynDNS Account Types supported are:
DNS-O-Matic
DynDNS (dynamic)
DynDNS (static)
DynDNS (custom)
DHS
DyNS
easyDNS
No-IP
ODS.org
ZoneEdit
Loopia
freeDNS
DNSexit
OpenDNS
Namecheap.com
More interface types (VPNs, etc) available for packet capture
DNS Forwarder is used by the firewall itself for DNS resolution (configurable) so the firewall benefits from faster resolution via multiple concurrent queries, sees all DNS overrides/DHCP registrations, etc.
DHCP Server can now handle arbitrary numbered options, rather than only options present in the GUI.
Automatic update now also works for NanoBSD as well as full installs
More configuration sections can be synchronized via XMLRPC between CARP nodes.
Download New Installation
pfSense Upgrade Guide
การ Block facebook, MSN, hotmail ด้วย pfSense
Posted by Unknown Tuesday, August 9, 2011การปิดกั้นเว็บไซต์ที่ไม่พึงประสงค์ตามสำนักงานหรือที่บ้าน ถ้าคุณใช้ pfSense อยู่แล้ว สามารถทำได้ง่าย ๆ ด้วยคุณสมบัติ DNS forwarder (Firewall อื่นๆ ที่มีคุณสมบัิตินี้ก็สามารถใช้ได้เช่นเดียวกัน)
ในทางเทคนิคแล้วเราสามารถแทนที่ DNS ภายนอกโดยการเปลี่ยนเส้นทางไปยังเว็บไซต์หรือ IP Address ตามที่เราต้องการได้ ยกตัวอย่างเช่น เว็บไซต์ hotmail.com, hi5.com, และ facebook.com เราจะทำการเปลี่ยนเส้นทางไปยัง IP Address 127.0.0.1 (loop back)
จากนั้นก็ทำการสร้าง LAN Rule เพื่อ Block Destination คือ 127.0.0.1 เพียงเท่านี้ก็สามารถ Block เว็บไซต์ดังกล่าวได้แร้วครับพี่น้อง..
สำหรับตัวอย่างนี้ผมจะทำการ Block Website คือ
www.facebook.com
www.hi5.com
www.hotmail.com
และ Messenger
1. สร้าง DNS forwarder โดยไปที่ Service > DNS Forwarder
รูปด้านล่าง คือตัวอย่าง DNS Forwarder ที่สร้างเสร็จแล้ว, กรณีต้องการ Block เว็บอื่นๆ สามารถเพิ่มได้เรื่อยๆ
2. สร้าง LAN Rule ตามภาพตัวอย่างครับ เมื่อสร้างเสร็จแล้วให้เลื่อนไว้อยู่ตำแหน่งบนสุด
3. ทดสอบการใช้งาน ว่าสามารถ Block ได้จริงหรือไม่
ในทางเทคนิคแล้วเราสามารถแทนที่ DNS ภายนอกโดยการเปลี่ยนเส้นทางไปยังเว็บไซต์หรือ IP Address ตามที่เราต้องการได้ ยกตัวอย่างเช่น เว็บไซต์ hotmail.com, hi5.com, และ facebook.com เราจะทำการเปลี่ยนเส้นทางไปยัง IP Address 127.0.0.1 (loop back)
จากนั้นก็ทำการสร้าง LAN Rule เพื่อ Block Destination คือ 127.0.0.1 เพียงเท่านี้ก็สามารถ Block เว็บไซต์ดังกล่าวได้แร้วครับพี่น้อง..
สำหรับตัวอย่างนี้ผมจะทำการ Block Website คือ
www.facebook.com
www.hi5.com
www.hotmail.com
และ Messenger
1. สร้าง DNS forwarder โดยไปที่ Service > DNS Forwarder
คุณสมบัติของ pfSense
Posted by Unknown Monday, May 9, 2011pfSense ได้รวมเอาคุณสมบัติทั้งหมดของไฟร์วอลล์ในเชิงธุรกิจที่มีราคาแพง ข้างล่างเป็นคุณสมบัติของไฟร์วอลล์รุ่น 1.2.3 คุณสมบัติต่างๆสามารถจัดการได้ผ่านหน้าเว็บโดยไม่ต้องใช้คำสั่งที่เป็น command line ใดๆเลย
นอกจากนั้น ในส่วนของคุณสมบัติยังได้รวมข้อจำกัดของระบบเพื่อที่ผู้ใช้จะได้พึงระวัง จากประสบการณ์และการให้ความช่วยเหลือของผู้ใช้นับพันของเรา ทำให้เราเข้าใจเป็นอย่างดีว่าอะไรที่ซอฟต์แวร์ทำได้และทำไม่ได้ ทุกๆซอฟต์แวร์แพ็คเกจมีข้อจำกัด ที่ที่มีความเห็นแตกต่าง เราต้องสื่อสารกันให้เข้าใจ เรายินดีต้อนรับทุกๆคนที่ต้องการให้การช่วยเหลือเพื่อกำจัดข้อจำกัดเหล่านี้ ความแตกต่างหลายๆตัวเป็นเรื่องปกติสำหรับไฟร์วอลล์โอเพ่นซอร์สและไฟร์วอลล์ เชิงธุรกิจ ข้อจำกัดของรุ่น 1.2.3 ได้รับการแก้ไข้แล้วและจะอยู่ในบันทึกของไฟร์วอลล์รุ่นถัดไป
คุณสมบัติ
Firewall
- Filtering by source and destination IP, IP protocol, source and destination port for TCP and UDP traffic
- สามารถจำกัดจำนวนการเชื่อมต่อ (Connection) ต่อ Rule ได้
- สามารถ Filter โดยใช้ระบบปฏิบัติการเป็นเงี้อนไขได้ เช่น อนุญาตให้เครื่องคอมพิวเตอร์ที่เป็น Linux ใช้งานอินเตอร์เน็ตได้ แต่ไม่อนุญาตให้เครื่องที่เป็น Windows ใช้งานอินเตอร์เน็ต
- สามารถเซ็ตแ่ต่ละ Rule ให้เก็บหรือไม่เก็บ Log ได้
- มีความยืดหยุ่นสูงในการทำ Policy Routing โดยสามารถเลือก Gateway ของแต่ละ Rule ได้ (สำหรับ Load balancing, Fail Over, Multi-WAN เป็นต้น)
- สามารถตั้งชื่อกลุ่มของ IP, เน็ตเวิร์ค หรือ พอร์ต ได้ ทำให้เข้าใจง่ายและสะอาดต่อการจัดการ Rule ต่างๆ โดยเฉพาะอย่างยิ่งสำหรับระบบที่มีหลายๆ Public IP และมีเครื่องเซิร์ฟเวอร์หลายๆเครื่อง
- มีความสามารถทำ Transparent Layer 2 สามารถทำ Bridge และ Filter ระหว่าง Interface ได้
- สามารถทำ Package Normallization ได้ Scrubbing เป็นการ Normalize package ที่มีความกำกวม ไม่ให้มีการตีความที่กำกวมเกิดขึ้นที่ปลายทาง Scrub ยังทำการ Reassemble package เพื่อป้องกันไม่ให้บางระบบปฏิบัติการถูกโจมตี และ Drop package ที่มี Flag ผิดปกติ
- เปิดการใช้งานเป็นค่าปกติ (Enabled by default)
- สามารถปิดใช้งานได้ ถ้าจำเป็น
- สามารถปิดการใช้งานไฟร์วอลล์ได้ ถ้าต้องการให้ไฟร์วอลล์ทำหน้าที่เป็น Router
State Table
State Table ของไฟร์วอลล์ เป็นการคงไว้ของการเชื่อมต่อของในเน็ตเิวิร์คของคุณ pfSense มีคุณสมบัติมากมายในการควบคุมอนูของ State Table ขอบคุณสำหรับความสามารถนี้ของ OpenBSD pf- สามารถปรับขนาดของ State Table ได้ -- มี pfSense หลายตัวที่มีการใช้งานอยู่มี State Table หลายแสน ขนาด State Table ปกติคือ 10,000 แต่สามารถเพิ่มได้อย่างอิสระตามต้องการ แต่ละ State จะให้หน่วยความจำประมาณ 1 กิโลไบต์ ฉะนั้น พึงระลึกอยู่เสมอถึงการใช้งาน อย่าเซ็ตค่าให้สูงจนเกินไป
- ในแต่ละ Rule สามารถ
- จำกัดจำนวนการเชื่อมต่อ (Connection) ต่อเครื่อง
- จำกัดจำนวน state ต่อ Host
- จำกัดการเชื่อต่อใหม่ (new connection) ต่อวินาที
- กำหนดการหมดเวลาของ state (state timeout)
- กำหนดชนิดของ state
- State Type--pfSense หลากหลายตัวเลือกในการจัดการกับ State
- Keep state ใข้ได้กับทุกโปรโตคอล เป็นค่าปกติสำหรับทุก Rule
- Modulate state ใช้ได้เฉพาะกับโปรโตคอล TCP pfSense จะสร้าง Initial Sequence Number (ISN) ในนาม host
- Synproxy state เป็นการเข้ามาเชื่อมต่อ Proxy โดยใช้โปรโตคอล TCP ใช้เพื่อป้องกันเซิร์ฟเวอร์จากการ spoof TCP SYN floods ตัวเลือกนี้ได้รวมอยู่ในอยู่ใน Keep state และ Modulate State
- None ไม่รักษา State ใดๆของการเชื่อมต่อ ซึ่งหายากมาก แต่ก็มีให้ใช้ เนื่องจากจะเป็นประโยชน์ข้อจำกัดบางสถานการณ์
- State table optimization option - pf ได้เสนอตัวเลือก 4ตัวเลือกสำหรับ State Table Optimization
- Normal - เป็นค่าปกติ
- High latency - มีประโยชน์สำหรับ link ที่ช้า เช่น การเชื่อมต่อผ่านดาวเทียม สถานะการเชื่อมต่อมีอายุนานกว่าปกติ
- Aggressive - สถานะการเชื่อมต่อมีอายุสั้น เพิ่มประสิทธิภาพการใช้ทรัพยากรของฮาร์ดแวร์ แต่จะ drop package ที่ดีไปด้วย
- Conservative - พยายามที่จะหลีกเลี่ยงการ drop package ที่ดี เพื่อประหยัดค่าใช้จ่ายในการที่จะซื้อหน่วยความจำเพิ่มและใช้งาน CPU ให้เต็มประสิทธิภาพ
Network Address Translation (NAT)
- การทำ Port forwarding แบบช่วงและแบบหลายๆ Public IP
- 1:1 NAT สำหรับ IP เดียว หรือ สำหรับทั้ง Subnet
- Outbound NAT
- ค่า NATปกติสำหรับ Outbound trafic ทั้งหมด ถูก NAT ไปยัง IP ที่อยู่ฝั่ง WAN ในรูปแบบที่มีหลาย WaN ค่า NAT ปกติ จะถูก NAT ไปยัง IP ที่กำลังใช้งานฝั่ง WAN
- การทำ Outbound NAT ขั้นสูง ทำให้ค่า NAT ปกติถูกปิดการใช้งาน และเปิดการใช้งานการสร้าง NAT ที่มีความยืดหยุ่นมากขึ้นกว่าเดิม (คือสามารถกำหนด Rule ที่ไม่ให้ทำ NAT ได้)
- NAT Reflextion - ในการตั้งค่าบางครั้ง เป็นไปได้ที่ Service ที่เข้าถึงโดย Public IP สามารถเข้าได้จากเน็ตเวิร์คข้างใน
NAT Limitations
- ข้อจำกัดของ PPTP และ GRE สถานะของ Tracking Code ใน pf สำหรับโปรโตคอล GRE สามารถ Track ได้เพียงแค่ 1 Session ต่อ Public IP หมายความว่า ถ้าคุณใช้ PPTP VPN มีเพียงแค่หนึ่งเครื่องเท่านั้นที่สามารถเชื่อมต่อไปยัง PPTP Server ที่อยู่บนอินเตอร์เน็ต เครื่องหนึ่งพันเครื่องสามารถเชื่อมต่อกับหนึ่งพัน PPTP Server ที่แตกต่างกัน แต่เครื่องลูกข่ายหนึ่งเครื่องสามารถเชื่อมต่อกับ 1 PPTP Server เท่านั้น ดังนั้น ในการใช้งานจริงต้องใช้หลายๆ Public IP บนไฟร์วอลล์
- ข้อจำกัดของ SIP โดยปกติ Trafic ของ TCP และ UDP ทั้งหมด นอกเหนือจาก SIP และ IP นำ Source Port มาเขียนใหม่ ข้อมูลเพิ่มเติมสามารถหาอ่านได้จาก Static port documentation เนื่องจากการเขียน Source Port ขึ้นมาใหม่นี้เอง ทำให้ pf สามารถติดตามได้ว่าคอมพิวเตอร์ภายในเครื่องใหนได้ทำการเชื่อมต่อไปยัง เครื่องเซิร์ฟเวอร์ภายนอก และ Trafic ของ SIPส่วนใหญ่ทั้งหมดใช้ Source port เหมือนกัน ฉะนั้น อุปกรณ์ SIP เพียงหนึ่งตัวเท่านั้นทีสามารถเชื่อมต่อไปยังเครื่อง Server ข้างนอกได้ ถ้าไม่แล้ว อุปกรณ์ SIP ของคุณต้องสามารถใช้ Port ที่เขียนขึ้นใหม่ได้ (ส่วนใหญ่ไม่สามารถทำได้) ดังนั้น คุณไม่สามารถใช้โทรศัพท์หลายเครื่องเชื่อมต่อไปยังเซิร์ฟเวอร์ข้างนอก เครื่องเดียวกันโดยไม่ใช้ public IPหนึ่งเบอร์ต่อหนึ่งอุปกรณ์ sipproxy package เป็นคำตอบสำหรับปัญหานี้ ใน pfSense 1.2.2 และใหม่กว่า
- ข้อจำกัดของ NAT Reflextion - NAT Reflection สามารถใช้ช่วงของ port ได้ไม่เกิน 500 ports และไม่สามารถเป็น NAT 1:1 ได้
Redundancy
CARP จาก OpenBSD อนุญาตให้ทำ Hardware Failover ได้ ไฟร์วอลลสองตัวหรือมากกว่า สามารถตั้งค่าให้เป้น Failover Group ได้ ถ้า interface ใดบนเครื่องหลัก (primary) ใช้งานไม่ได้ หรือเครื่องหลักเปลี่ยนสถานะเป็น Offline ไฟร์วอลล์ตัวที่สองก็จะ Active ขึ้นมา pfSense ได้รวมความสามารถให้การทำ Synchronization Configuration เข้ามาด้วย ดังนั้น เมื่อคุณเปลี่ยนแปลงค่าต่างๆบนไฟร์วอลล์หลัก ค่าเหล่านั่นก็จะไปอยู่ในไฟร์วอลล์ตัวที่สองด้วยอัตโนมัติด้วย pfSync ทำให้มั่นใจได้ว่า State ของไฟร์วอลล์จะถูก Replicate ไปยังทุกๆไฟล์วอลล์ทุกตัวที่ได้ตั้งค่าเป็น Failover หมายความว่า การเชื่อมต่อของคุณที่มีอยู่ยังคงมีต่อไปในกรณีไฟร์วอลล์หลักไม่สามารถทำงาน ได้ ซึ่งเป็นสิ่งสำคัญในการป้องกันการเกิดปัญหาของระบบเครือข่าย
Limitations
- Backup Firewall ไม่ได้ทำงาน (active-passive failover) ขณะนี้ยังไม่มี active-active clustering
- Failover ไม่สามาถทำงานได้ในทันที จะใช้เวลาประมาณ 5 วินาที เพื่อสลับการทำงานไปยังไฟร์วอลล์ตัวที่สอง ระหว่างนี้จะไม่มี Trafic ผ่านออกไป แต่ state ที่มีอยู่ยังคงรักษาไว้ และจะใช้งานได้หลังจาก Failover พร้อมทำงาน
Load Balancing
Outbound Load Balancing
Outbound Load Balancing ใช้สำหรับไฟร์วอลล์ที่หลายๆ WAN, Trafic ที่ตรงไปยัง gateway หรือ Load Balancing Pool จะเป็นไปตาม Rule ที่ตั้งค่าไว้Inbound Load Balancing
Inbound Load Balancing ใช้เพื่อกระจายโหลดไปยังเซิร์ฟเวอร์หลายๆตัว ซึ่งใช้กันทั่วไปกับ web server, Mail server และเซิร์ฟเวอร์ออื่นๆ เครื่องเซิร์ฟเวอร์ที่ไม่ตอบสนองต่อการ ping หรือ port connection จะถูกเอาออกไปจาก poolLimitations
การกระจายงานอย่างละเท่าๆกันไปยังเซิร์ฟเวอร์แต่ละตัวที่อยู่ใน pool การกระจายงานแบบไม่เท่ากันยังไม่สามารถทำได้ ณ เวลานี้VPN
pfSense มีตัวเลือกสำหรับ VPN คือ IPSec, OpenVPN และ PPTPIPsec
IPSec อนุญาตให้มีการเชื่อมต่อด้วยอุปกรณ์มาตราฐานที่สนับสนุน IPSec ซึ่งส่วนใหญ่ใช้สำหรับการเชื่อมต่อแบบ site-to-site ไปยัง pfSense อีกตัว Open Source Firewalls (m0n0wall) หรือไฟร์วอลล์ในเชิงธุรกิจอื่นๆ (Cisco,Juniper) นอกจากนี้ยังสามารถใช้งานได้กับเครื่องลูกข่ายที่เป็นคอมพิวเตอร์แบบพกพาได้ ด้วยLimitations
- NAT-T ไม่สามารถใช้งานได้จนกระทั่งถึงเวอร์ชัน 2 หมายความว่า เครื่องลูกข่ายแบบพกพาไม่สามารถใช้งานได้หากมีการใช้ NAT ข้อจำกัดนี้มีผลกับเครื่องลูกข่ายแบบพกพาเท่านั้น การใช้ OpenVPN และ PPTP เป็นคำตอบที่ดีกว่า
- ความสารมารถอื่นของ IPSec จะไม่สามารถใช้ได้เมื่อถึงไฟล์วอลล์รุ่นที่ 2 เช่น PDP, XAuth, NAT-T และอื่นๆ
OpenVPN
OpenVPN มีความยืดหยุ่น และใช้ SSL VPN ซึ่งสนับสนุนระบบปฏิบัติการของเครื่องลูกข่ายที่หลากหลายกว่า ดูข้อมูลเพิ่มเติมได้ที่เว็บไซต์ OpenVPNPPTP Server
PPTP เป็นที่นิยมกันมากเนื่องจากเกือบทุกระบบปฏิบัติการได้รวมเอา PPTP Client รวมถึงระบบปฏิบัติการวินโดว์ ตั้งแต่ วินโดว์ 9 OSR2 ดูข้อมูลเพิ่มเติมได้ที่เว็บไซต์ WikipediapfSense Server สามารถใช้ฐานข้อมูลใน pfSense หรือบน RADIUS Server RADIUS Accounting ก็ใช้งานได้เช่นเดียวกัน Firewall Rule บน PPTP interface สามารถควบคุม trafic ที่มาจากเครื่องลูกข่ายได้
Limitations
เนื่องจากข้อจำกัดของ pf NAT เมื่อเปิดใช้งาน PPTP Server PPTP Client ไม่สามารถใช้ Public IP เดียวกันสำหรับการเชื่อมต่อ PPTP ออกไปข้างนอก หมายความว่า ถ้าคุณมี Public IP เพียงตัวเดียว และใช้ PPTP Server เครื่องลูกข่ายภายในจะไม่สามารถใช้งานได้ ถ้าจะใช้ต้องมี Public IP ตัวที่สองแล้วทำ NAT ขั้นสูง (Advance Outbound NAT) สำหรับเครื่องลูกข่ายภายในอื่นๆPPPoE Server
PPoE ServerpfSense ก็มี PPoE Server ด้วย สามารถอ่านข้อมูลเพิ่มเติมได้ใน PPoE Protocal ดูได้ที่ Wikipedia สามารถทำ Autheticate กับรายชื่อผู้ใช้ใน pfSense ได้ การ Authenticate กับ RADIUS ก็สามารถทำได้เช่นเดียวกัน
Reporting and Monitoring
RRD Graphs
RRD Graphs ใน pfSense ทำหน้าเก็บประวัติข้อมูลของ- การทำงานของ CPU
- Throughput
- Firewall State
- Throughput เดี่ยวๆของแต่ละ Interface
- จำนวน Package ต่อวินาทีของ Interface ทั้งหมด
- ระยะเวลาการตอบสนองของการ ping WAN
- QoS
Real Time Information
ประวัติข้อมูลเป็นสิ่งสำคัญ แต่บางครั้งการได้เห็นข้อมูลข่าวสารขณะที่กำลังเกิดขึ้นจริง (real time) ก็สำคัญกว่าSVG graphs สามารถแสดง Throughput ในขณะที่กำลังเกิดขึ้นของแต่ละ Interface
สำหรับ QoS คุณสามารถเห็นคิวของแต่ละ QoS ได้เลย
Dynamic DNS
Dynamic DNS Client ยอมให้คุณลงทะเบียน IP กับผู้ให้บริการ Dynamic DNS- DynDNS
- DHS
- easyDNS
- No-IP
- ODS.org
- ZoneEdit
Limitations
- ใช้ได้เฉพาะ WAN Interface หลายๆ WAN สามารถใช้ได้ในเวอร์ชั่น 2
- สามารถอัปเดทได้เพียง 1 Account ต่อหนึ่งผู้ให้บริการ เวอร์ชั่น 2.0 ไม่จำกัดจำนวน Account
- ใช้ได้เมื่อ pfSense กำหนด Public IP ให้กับ WAN interface ถ้าคุณมีโมเด็มซึ่งเป็นตัวรับ Public IP และกำหนด Private IP ให้กับ pfSense, Private IP นั้นก็จะถูกลงทะเบียนไว้กับผู้ให้บริการ ในเวอร์ชั่น 2.0 จะมีตัวเลือกให้ตรวจสอบ Public IP ก่อนที่จะลงทะเบียน IP กับผู้ให้บริการ
Captive Portal
Captive Portal อนุญาตให้คุณบังคับให้ Authenticate หรือทำการ Redirect ไปยังเว็บเพจเพื่อให้คุณคลิกเพื่อที่จะผ่านเน็ตเวิร์คออกไปได้ ซึ่งส่วนใหญ่ใช้กับ Hot Spot แต่ก็สามารถนำไปใช้ได้กับเน็ตเวิร์คขององค์กรเพื่อระดับความปลอดภัยบนเครือ ข่ายไร้สาย หรือ การเข้าถึงอินเตอร์เน็ต ข้อมูลเพิ่มเติมเกี่ยวกับเทคโนโลยีของ Captive Portal สามารถอ่านเพิ่มเติมได้ที่ Wikipedia รายการดังต่อไปนี้เป็นความสามารถของ Captive Portal ใน pfSense- Maximum concurrent connection -- จำกัดจำนวนการเชื่อมต่อต่อของ IP ของเครื่องลูกข่าย คุณสมบัตินี้เป็นการป้องกัน Denial of Service จากเครื่องลูกข่ายที่ส่ง trafic อย่างต่อเนื่องปราศจากการ authenticate หรือคลิกที่เว็บเพจที่ Redirect ไป
- Idle timeout - ตัดการเชื่อมต่อเมื่อไม่มีการใช้งานในเวลาที่กำหนด
- Hard timeout - ตัดการเชื่อมต่อโดยอัตโนมัติเมื่อถึงเวลาที่กำหนด
- Logon pop up window - เป็น pop up window ที่มีปุ่ม log off
- URL Redirection - หลังจากการ Authenticate หรือคลิกบนเว็บเพจเป็นที่เรียบร้อยแล้ว เราสามารถ Redirect ไปยังเว็บเพจที่เรากำหนดไว้ได้
- MAC Filter - สามารถ filter โดยใช้ MAC Address
- Authentication Option - มีสามตัวเลือกในการทำ authentication
- No authentication - หมายความว่า ผู้ใช้เพียงแค่คลิกในหน้าที่ Redirect ไป โดยที่ไม่ต้องให้รหัสผ่านแต่อย่างใด
- Local user manager - สามารถใช้ฐานข้อมูลผู้ใช้ใน pfSense ได้
- RADIUS authentication - เป็นวิธีการที่แนะนำสำหรับผู้ใช้ในองค์กรและ ISP สามารถ Authenticate กับ Microsoft Active Directory และ RADIUS Server หลายๆตัว
- ความสามารถของ RADIUS
- บังคับให้ทำการ Re-authenticate
- สามารถส่ง Accounting Update ได้
- RADIUS MAC authentication อนุญาตให้ Captive Portal authenticate ไปยัง RADIUS server โดยใช้ MAC address ของเครื่องลูกข่ายเสมือนเป็น User Name และ password
- อนุญาตให้ทำ Redundant RADIUS server ได้
- HTTP or HTTPS - Portal page สามารถตั้งค่าให้เป็น HTTP หรือ HTTPS ได้
- Pass-through MAC and IP Address - MAC และ IP address สามารถทำการบายพาสได้ เครื่องคอมพิวเตอร์ใดก็ตามที่ใช้ NAT port forwarding จะต้องทำการบายพาส
- File Manager - อนุญาตให้อัปโหลดภาพเพื่อใช้ใน Portal Page ได้
Limitations
- สามารถทำงานได้เพียงแค่หนึ่ง Interface
- Reverse portal เช่น การ capture trafic จากอินเตอรืเน็ตและเข้าสู่เน็ตเวิร์คของคุณไม่สามารถทำได้
- เฉพาะ IP และ MAC Address เท่านั้นที่สามารถ Filter ได้ ไม่สามารถทำกับโปรโตคอลหรือพอร์ตได้
- ปัจจุบันนี้ยังไม่สามารถใช้กับ Rule ที่มีหลายๆ WAN ได้ เราหวังว่าจะสามารถแก้ปัญหานี้ได้ในเวอร์ชัน 2.0
DHCP Server and Relay
pfSense ได้รวมเอา DHCP Server และ Relay เข้ามาด้วย
Subscribe to:
Posts (Atom)