Hướng dẫn tắt/mở dịch vụ firewalld trên CentOS 7

Hướng dẫn tắt/mở dịch vụ firewalld trên CentOS 7Cuongquach.com | Chương trình firewalld (Dynamic Firewall Manager) cung cấp cơ chế tường lửa được quản lý động trên hệ điều hành CentOS/RHEL 7. Công cụ này cho phép xác định mức độ tin cậy của các kết nối mạng vào hệ thống CentOS 7. Nó hỗ trợ cả cài đặt tường lửa IPv4 và IPv6. Nhưng nếu bạn không quen với việc sử dụng dịch vụ tường lửa firewalld thì có thể tắt nó đi và sử dụng ‘iptables’.

Có thể bạn quan tâm chủ đề khác
Hướng dẫn cài đặt Docker trên CentOS 7
Hướng dẫn cài đặt Zabbix Server trên CentOS 7
Hướng dẫn cài đặt LAMP trên CentOS 7
Hướng dẫn cài đặt osTicket trên CentOS 7 làm kênh ticket helpdesk
Hướng dẫn cài đặt VestaCP trên CentOS 7 quản lý VPS/Hosting

Tắt khởi động firewalld khi reboot os

Chúng ta sẽ không cho phép dịch vụ firewalld khởi động cùng hệ thống CentOS 7.

# systemctl disable firewalld

Bật khởi động firewalld khi reboot os

Chúng ta cho phép dịch vụ firewalld khởi động cùng hệ thống CentOS 7.

# systemctl enabled firewalld

Khởi động tường lửa firewalld

Khởi động dịch vụ firewalld chưa được chạy trên CentOS 7.

# systemctl start firewalld

Dừng tường lửa firewalld

Dừng hoạt động của dịch vụ firewalld đang chạy.

# systemctl stop firewalld

Kiểm tra trạng thái firewalld

# systemctl status firewalld

Cài đặt ‘iptables’

Tất nhiên do firewalld thay thế cho iptables nên iptables không được cài đặt mặt định, hãy làm việc này thủ công:

# yum -y install iptables-services

Đến bước này, bạn gần như đã hoàn thành rồi, iptables đã được cài đặt như CentOS 5 6, giờ chỉ cần khởi động và nạp lệnh vào thôi:

# systemctl enable iptables
# systemctl start iptables

Kiểm tra iptables đã hoạt động hay chưa:

# systemctl status iptables

Vậy là bạn đã biết cách tắt dịch vụ tường lửa thế hệ mới firewalld trên CentOS 7 và sử dụng chương trình dịch vụ tường lửa ‘iptables‘ nguyên gốc nhé.

Nguồn: https:/cuongquach.com/

How to Start/Stop or Enable/Disable firewalld on CentOS 7

How to Start/Stop or Enable/Disable firewalld on CentOS 7Cuongquach.com | firewalld (Dynamic Firewall Manager) tool provides a dynamically managed firewall. The tool enables network/firewall zones to define the trust level of network connections and/or interfaces. It has support both for IPv4 and IPv6 firewall settings. Also, it supports Ethernet bridges and allow you to separate between runtime and permanent configuration options. Finally, it supports an interface for services or applications to add firewall rules directly.

Disable firewalld

To disable firewalld, execute the following command as root or using sudo:

# systemctl disable firewalld

Enable firewalld

To enable firewalld, execute the following command as root or using sudo:

# systemctl enable firewalld

Stop firewalld

To stop (or deactivate) firewalld,execute the following command as root or using sudo:

# systemctl stop firewalld

Start firewalld

To start (or activate) firewalld, execute the following command as root or using sudo:

# systemctl start firewalld

Status of firewalld

To check the status of firewalld, execute the following command as root or using sudo:

# systemctl status firewalld

Very easy to stop firewalld and begin using ‘iptables‘ instead of if you want.

Via Cuongquach.com

 

Quách Chí Cường: Bạn đang theo dõi website "https://cuongquach.com/" nơi lưu trữ những kiến thức tổng hợp và chia sẻ cá nhân về Quản Trị Hệ Thống Dịch Vụ & Mạng, được xây dựng lại dưới nền tảng kinh nghiệm của bản thân mình, Quách Chí Cường. Hy vọng bạn sẽ thích nơi này !
Related Post