0. 사전작업
Centos 7.x 부터는 firewalld라는 방화벽 데몬이 따로 돌아간다. 예전처럼 iptables를 사용하고 싶다면 systemctl 설정을 변경시켜줘야 한다. 이작업을 하기전에 firewalld 데몬을 중지 시키고 재부팅시에도 안올라오게 해주는 사전작업을 하기 바란다.
systemctl stop firewalld systemctl mask firewalld 이렇게 해주면 된다. |
1. 설치 확인
[root@localhost /]# rpm -qa |grep iptables iptables-1.4.21-28.el7.x86_64 |
2. 설치
[root@localhost /]# yum -y install iptables-services |
3. 설치 상태 체크
[root@localhost /]# systemctl list-unit-files |grep iptables [root@localhost /]# [root@localhost /]# systemctl list-unit-files |grep iptables iptables.service disabled [root@localhost /]# |
4. iptables 서비스 데몬을 자동으로 활성화 하게 설정
[root@localhost /]# systemctl enable iptables Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service. [root@localhost /]# |
5. 서비스 시작/중지
[root@localhost /]# systemctl start iptables
중지시 [root@localhost /]# systemctl status iptables.service
활성화시 [root@localhost /]# systemctl status iptables.service |
위와같이 실행하면 된다.
'〔 SERVER 〕 > ↗『Linux』' 카테고리의 다른 글
[Centos]_7.x 리눅스 GUI모드 설치 (0) | 2020.08.14 |
---|---|
[Centos]_7.x 리눅스 GPU 설치 (1) | 2020.08.11 |
[Centos]_7.x버전 최소 설치 후 ifconfig 명령어 인식 불가 (0) | 2020.02.17 |
[Centos]_마운트하기 설정 (0) | 2019.03.07 |
[Centos]_고정아이피 설정 하기 (0) | 2019.02.27 |