웹마스터 팁

ufw는 uncomplicated firewall의 약자인가봅니다.

설정은 아래 보면 알겠지만 매우 쉽습니다.
그리고 웬만하면, 서비스 이름으로 allow 하는것을 추천합니다.
왜냐면, allow http 하면 자동으로 80/tcp만 열어줍니다.

얘가 안깔려있으면
root@delphiXE:~# apt-get -y install ufw

활성화하려면
root@delphiXE:~# ufw enable
비활성화하려면
root@delphiXE:~# ufw disable

전부 deny하려면
root@delphiXE:~# ufw default deny
전부 allow하려면
root@delphiXE:~# ufw default allow

서비스 이름으로 allow하려면 (예를들어 http)
root@delphiXE~# ufw allow http
서비스 이름으로 deny하려면 (예를들어 http)
root@delphiXE~# ufw deny http

포트로 allow하려면
root@delphiXE~# ufw allow 80
포트로 deny하려면
root@delphiXE~# ufw deny 80

포트/프로토콜로 allow하려면
root@delphiXE~# ufw allow 80/tcp
포트/프로토콜로 deny하려면
root@delphiXE~# ufw deny 80/tcp

특정 ip에서만 특정포트 allow하려면
root@delphiXE~# ufw allow from 121.121.121.121 to port 22
특정 ip에서만 특정포트 deny하려면
root@delphiXE~# ufw deny from 121.121.121.121 to port 22

출처 http://folderfile.net/xe/3112