- ๊UFW เป็น firewall ที่ค่อนข้างใช้งานง่าย
- การปรับแต่ง rule สามารถทำผ่าน command line หรือ GUI ก็มีให้ใช้
- ติดตั้งด้วยคำสั่ง
sudo apt-get install ufw
urn firewall on and off (‘disable’ is default ACCEPT)
# ufw enable|disable
Toggle logging
# ufw logging on|off
Set the default policy (ie “mostly open” vs “mostly closed”)
# ufw default allow|deny
Accept or drop incoming packets to (can see what services are available with ‘status’ (see below)). can be specified via service name in /etc/services, ‘protocol:port’, or via package meta-data. ‘allow’ adds service entry to /etc/ufw/maps and ‘deny’ removes service entry from /etc/ufw/maps. Basic syntax:
# ufw allow|deny [service]
Display status of firewall and ports in the listening state, referencing /var/lib/ufw/maps. Numbers in parenthesis are not displayed to user
# ufw status
UFW Examples
Allow port 53
$ sudo ufw allow 53
Delete Allow port 53
$ sudo ufw delete allow 53
Allow port 80
$ sudo ufw allow 80/tcp
Delete Allow port 80
$ sudo ufw delete allow 80/tcp
Allow port smtp
$ sudo ufw allow smtp
Delete Allow port smtp
$ sudo ufw delete allow smtp
Allow fro Particular IP
$ sudo ufw allow from 192.168.254.254
Delete the above rule
$ sudo ufw delete allow from 192.168.254.254
GUI Tool for UFW
If you want GUI for UFW check this guide
- คอนฟิกไฟล์จะอยู่ที่ /etc/ufw/ufw.conf
Refer
- ทดสอบบน Ubuntu 11.04
- http://www.ubuntugeek.com/ufw-uncomplicated-firewall-for-ubuntu-hardy.html
- http://www.ubuntugeek.com/gufw-simple-gui-for-ufw-uncomplicated-firewall.html
No comments:
Post a Comment