Site icon Init HTML

Sửa lỗi không tự động mở Port khi Reboot

Tắt firewalld

Đăng nhập vào SSH, chạy lệnh sau:

systemctl disable firewalld.service
systemctl stop firewalld.service

Cập nhật IPtables

Lưu ý: Nếu bạn chưa cài đặt IPtables, dùng lệnh sau:

yum install iptables-services

Ở tập tin /etc/sysconfig/iptables-config, cập nhật:

IPTABLES_SAVE_ON_RESTART="yes"

Sau đó, chạy lại các lệnh:

systemctl start iptables.service
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
iptables -I INPUT -p tcp --dport 443 -j ACCEPT
systemctl enable iptables.service
service iptables save
systemctl restart iptables.service

Chúc các bạn thành công!

Exit mobile version