As we all know that, CentOS / RHEL 7 both are completely systemd based, So We will have to use few systemd related commands to disable firewalld and enable iptables service.
1. Disable Firewalld Service.
[root@localhost ~]# systemctl disable firewalld
2. Stop Firewalld Service.
[root@localhost ~]# systemctl stop firewalld
3. Install iptables service related packages.
[root@localhost ~]# yum -y install iptables-services
4. Make sure service starts at boot:
[root@localhost ~]# systemctl enable iptables
# If you do not want ip6tables, You can skip following command.
[root@localhost ~]# systemctl enable ip6tables
5. Now, Finally Let’s start the iptables services.
[root@localhost ~]# systemctl start iptables
# If you do not want ip6tables, You can skip following command.
[root@localhost ~]# systemctl start ip6tables
Firewalld Service is now disabled and stop, You can use iptables.
Now, You will be able to use iptables as your firewall, You can add / remove rules as you were doing in previous releases of Red Hat / CentOS 5 and 6, You can configure firewall with iptables in same manner as previous.
'OS > Linux' 카테고리의 다른 글
우분투 ubuntu 11.04 nvidia X Powermizer 끄기 (0) | 2021.05.08 |
---|---|
리눅스 패키지 관리 Package Management Basics: apt, yum, dnf, pkg (0) | 2021.03.28 |
Unix 및 Linux 쉘 스크립트에서 날짜 계산 방법 (0) | 2021.03.24 |
Allow users to run any commands anywhere without their password (0) | 2021.03.24 |
How To Add Swap on CentOS 7 (0) | 2021.03.24 |