Obnova iptables pri starte - problem

Sekcia: Konfigurácia 04.01 | 20:53
Avatar dirko   Návštevník

Zdravim vsetkych mam problem na CentOS 7.4 po reboote sa mi nedari aby sa mi nacitala spravna konfiguracia iptables. mam ju ulozenu v subore pomocou :

iptables-save > /etc/iptables.conf

a do suboru /etc/rc.local som pridal

/sbin/iptables-restore < /etc/iptables.conf

ale nijako sa i to tam nechce pri starte dat. Neviete mi poradit co robim zle? Dakujem Roman

    • RE: Obnova iptables pri starte - problem 04.01 | 22:47
      Avatar okl   Návštevník

      cau

      neviem v akom stave mas ten centos tak len tipnem defaultne centos nepouziva iptables.service ale firewalld.service tak je dost mozne ze po starte ti startuju default firewalld pravidla.

      skontroluj po starte

      systemctl status firewalld ak ti bezi tak ho musis vypnut a nahradit iptables.serviceom

      ak to nie je tento scenar popis blizsie co si uz spravil.

    • RE: Obnova iptables pri starte - problem 05.01 | 00:10
      Avatar samalama.   Návštevník

      ak ma pamat neklame (servery instalujem automatizovane), tak /etc/rc.d/rc.local defaultne nema exec priznak...

      • RE: Obnova iptables pri starte - problem 05.01 | 10:41
        Avatar dirko   Návštevník

        dakujem za pomoc, bolo to presne tym priznakom

        • RE: Obnova iptables pri starte - problem 05.01 | 11:38
          Avatar okl   Návštevník

          #!/bin/bash # THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES # # It is highly advisable to create own systemd services or udev rules # to run scripts during boot instead of using this file. # # In contrast to previous versions due to parallel execution during boot # this script will NOT be run after all other services. # # Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure # that this script will be executed during boot.