CentOS 8 Iptables rules not loaded after reboot

kwyap 6 Reputation points
2020-08-03T21:33:33.65+00:00

Hi.

I have issue on my subscribed Azure VM running CentOS 8, where the iptables configured rule did not apply after the OS reboot. iptables-service package is installed, and "service iptables save" has been executed before rebooting the VM.

Seeking for advise..

Thank you.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,013 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. kwyap 6 Reputation points
    2020-08-06T18:59:28.123+00:00

    Hi.

    Notice the iptables still remain in-active after the VM reboot. The issue been resolved by enable the iptables service via "systemctl enable iptables".

    Thanks for your support and follow up.

    Regards..

    1 person found this answer helpful.

  2. vipullag-MSFT 26,487 Reputation points Moderator
    2020-08-04T11:53:51.697+00:00

    @kwyap

    Did you try disabling the firewalld (default service instead of iptables available now).

    Since you have installed the iptables, try to disable and mask the fiewalld service and check once.

    systemctl disable firewalld  
    
    systemctl mask firewalld  
    

    Restart iptables service iptables restart

    Save service iptables save and reboot.

    You can also try to save the rules to the relevant file using iptables-save > /etc/sysconfig/iptables

    Please 'Accept as answer' if it helped, so that it can help others in the community looking for help on similar topics.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.