GNU/Linux >> Belajar Linux >  >> Cent OS

CentOS / RHEL 7 :Jangan pernah menjalankan layanan iptables dan layanan FirewallD secara bersamaan!

Secara default, RHEL 7 menggunakan layanan FirewallD untuk menyediakan keamanan jaringan. FirewallD harus dihentikan dan dinonaktifkan saat menggunakan layanan iptables:

# systemctl stop firewalld.service
# systemctl disable firewalld.service
# systemctl enable iptables.service
# systemctl start iptables.service

Layanan iptables sekarang disediakan oleh paket terpisah yang disebut iptables-services:

# yum info iptables-services
Name        : iptables-services
Arch        : x86_64
Version     : 1.4.21
Release     : 13.el7
Size        : 23 k
Repo        : installed
From repo   : anaconda
Summary     : iptables and ip6tables services for iptables
URL         : http://www.netfilter.org/
License     : GPLv2
Description : iptables services for IPv4 and IPv6
            : 
            : This package provides the services iptables and ip6tables that have been split
            : out of the base package since they are not active by default anymore.

Paket iptables-services mungkin perlu diinstal pertama kali:

# systemctl -a|grep iptables
● iptables.service                      not-found inactive dead      iptables.service

Hentikan dan nonaktifkan layanan firewalld terlebih dahulu.

# systemctl stop firewalld.service
# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.

Jika Anda mencoba mengaktifkan layanan iptables, itu akan gagal.

# systemctl enable iptables.service
Failed to execute operation: No such file or directory

Instal iptables-services paket.

# yum install iptables-services -y

Aktifkan layanan iptables :

# systemctl enable iptables.service
Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.

Mulai layanan iptables :

# systemctl start iptables.service
#


Cent OS
  1. Jalankan Keduanya Pada Saat Yang Sama, Windows Dan Ubuntu?

  2. CentOS / RHEL 7 :Cara beralih ke iptables dari firewalld

  3. CentOS / RHEL 7 :Jangan pernah menjalankan layanan iptables dan layanan FirewallD secara bersamaan!

  1. CentOS / RHEL :Cara menginstal dan memulai layanan Apache httpd

  2. Cara menonaktifkan firewalld dan dan beralih ke iptables di CentOS / RHEL 7

  3. Memecahkan masalah "koneksi ditolak" Dari Server Jarak Jauh di CentOS/RHEL 7 (Masalah layanan Firewalld atau iptables)

  1. Cara Menonaktifkan 'lvm2-lvmetad.socket/service' di CentOS/RHEL 7

  2. Cara Menonaktifkan Layanan rpc.quotad di CentOS/RHEL 6 dan 7

  3. Cara Menggunakan iptables alih-alih firewalld di CentOS/RHEL 7 dan 8