Firewalld
CentOS 7 Firewalld
참고로 CentOS7에서 방화벽 명령어가 바뀌었다. (iptables -> firewalld) 2
설정 파일은 /etc/firewalld/zones
에 존재한다. 해당 경로의 public.xml
공개설정이 적용되어있다.
How to use
잘 알려진 서비스는 아래와 같이 추가하거나 제거할 수 있다.
$ firewall-cmd --permanent --zone=public --add-service=https
$ firewall-cmd --permanent --zone=public --remove-service=ssh
특정 포트번호를 추가할 경우 아래와 같이 입력하면 된다.
규칙 제거 방법은 아래와 같다.
$ firewall-cmd --permanent --zone=public --remove-service=http
$ firewall-cmd --permanent --zone=public --remove-port=3306/tcp
최종 적용은 아래와 같다.