1 / 6

สรุปประเด็นการทำ Firewall

สรุปประเด็นการทำ Firewall. IPTABLES. กำหนดความปลอดภัย. ใช้ Policy DROP i ptables –P INPUT DROP i ptables –P FORWARD DROP Iptables –P OUTPUT DROP. กรณี Server ที่ไม่ใช่ GATEWAY. Chain INPUT เปิด เฉพาะ Service ที่ต้องการให้บริการ เช่น

phong
Download Presentation

สรุปประเด็นการทำ Firewall

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. สรุปประเด็นการทำ Firewall IPTABLES

  2. กำหนดความปลอดภัย • ใช้ Policy DROP iptables –P INPUT DROP iptables –P FORWARD DROP Iptables –P OUTPUT DROP

  3. กรณีServerที่ไม่ใช่ GATEWAY Chain INPUT เปิด เฉพาะ Service ที่ต้องการให้บริการ เช่น iptables –A INPUT –i <eth..> –s <source> –d <destination> -p <potocol> --dport <port> -j ACCEPT • Interface ภายใน ( LOCALNET : 127.0.0.1) มักจะ ACCEPT ทุกกรณี เพื่อป้องกันการ Block ตัวเอง Iptables –A INPUT –i lo –p all –j ACCEPT • <source> หาก เป็น Interface ด้านนอกที่ต่อภายนอก ซึ่งไม่ทราบว่าผู้ขอใช้มาจากที่ใด อนุโลมว่าไม่ต้องกำหนด <destination> หากเป็น host ให้ใช้ /32ต่อท้าย IP

  4. กรณีServerที่ไม่ใช่ GATEWAY • Chain OUTPUT มักจะเปิด ACCEPT ไว้ตลอด iptables –A OUTPUT –o <eth..> -p <potocol> -j ACCEPT เช่น iptables –A OUTPUT –o lo –p all -j ACCEPT

  5. กรณีServerที่เป็น GATEWAY • Chain FORWARD จะปล่อยให้บริการทั้งหมดหรือเฉพาะที่ระบุก็ได้ • Iptables –A FORWARD -i <eth.> -s <source> -d <destination> -p <potocol> --dport <port> -j ACCEPT • iptables -A FORWARD -i eth0 –s 192.168.10.0/24 -p tcp --dport 80 -d 172.31.0.23 -j ACCEPT

  6. NAT • การทำให้ ลูกข่ายสามารถออกไปข้างนอกได้โดยการใช้ MASQUERADE จะเป็นการ map ให้เครื่องที่ออกใช้ ipเครื่องแม่ข่าย ซึ่งเราจะทำที่ CHAIN POSTROUTING • Iptables –t nat –A POSTROUTING –o <wan interface> -j MASQUERADE • echo 1 > /sys/net/ipv4/ip_forward iptable –F iptables –F –t nat

More Related