CentOS 7 에 iptables 설치

리눅스/Security|2019. 2. 12. 13:22
반응형

구글링을 좀 했더니 CentOS 7 부터는 firewalld 라는 방화벽 데몬이 따로 돌아간단다. 

예전처럼 iptables를 사용하기 위해서는 systemctl 설정을 좀 건드려 줘야한다.



우선 작동 중인 firewalld 데몬을 중지 시킨 후 재부팅 시에도 올라오지 않도록 설정한다.


systemctl stop firewalld

systemctl mask firewalld



다음으로 iptables 명령어와 연관된 패키지를 설치한다. 

CentOS 설치할 때의 옵션에 따라 설치 되었을 수도 있다. 

나는 웹 서버 구성으로 설치 했더니 이미 설치 되어 있었다.


yum -y install iptables-services



iptables 서비스 데몬이 재부팅시에 자동으로 올라오도록 만들자

systemctl enable iptables



기본 룰셋 위치는 /etc/sysconfig/iptables 이다.



[출처] https://luckyyowu.tistory.com/286 [요우의 내맘대로 블로그]

반응형

댓글()