Get 25 USD Free To USE VPSSIM

Hướng dẫn Disable Firewalld và sử dụng Iptables trên Centos 7

Posted on: 26/10/2014 Last Updated: 26/10/2014 4 Comments

Ở Centos 7, firewall mặc định đã được chuyển sang firewalld thay cho Iptables .  Nếu bạn vẫn muốn sử dụng Iptables trên Centos 7 thì bạn có thể làm theo hướng dẫn sau để disable  Firewalld và sử dụng Iptables.
Dưới đây là so sánh điểm khác nhau giữa hai service này.  Mình để nguyên tiếng Anh cho chính xác:

+ The iptables service stores configuration in /etc/sysconfig/iptables while firewalld stores it in various XML files in /usr/lib/firewalld/ and /etc/firewalld/. Note that the /etc/sysconfig/iptables file does not exist as firewalld is installed by default on Red Hat Enterprise Linux.
+ With the iptables service, every single change means flushing all the old rules and reading all the new rules from /etc/sysconfig/iptables while with firewalld there is no re-creating of all the rules; only the differences are applied. Consequently, firewalld can change the settings during runtime without existing connections being lost.

huong dan Iptables centos 7

Cài đặt các gói Iptables

yum install -y iptables-services

Disable dịch vụ firewalld :

systemctl mask firewalld

Để iptables và ip6tables tự khởi động khi boot

systemctl enable iptables
systemctl enable ip6tables

Stop dịch vụ firewalld

systemctl stop firewalld

Start iptables và ip6tables

systemctl start iptables
systemctl start ip6tables

Từ bây giờ bạn có thể chạy lệnh system-config-firewall hoặc  iptables mà không gặp lỗi gì cả.

No Related Post



Tạm thời mình đóng comment, bạn vui lòng sử dụng diễn đàn để được trả lời nhanh nhất.
Diễn đàn: https://community.vpssim.vn

Không bỏ lỡ tin tức, bài viết mới trên
HostingAZ.VN