Reloading iptables












24















I made changes to iptables config file in /etc/iptables/filter in Ubuntu and want to reload them. I read the man page and also googled but couldn't find the information. Any help will be appreciated.










share|improve this question















migrated from stackoverflow.com Dec 30 '11 at 0:33


This question came from our site for professional and enthusiast programmers.
















  • You have neither provided any information about the version of Ubuntu you are using, nor searched the web well, before posting this question.

    – Puspendu Banerjee
    Dec 6 '10 at 18:35
















24















I made changes to iptables config file in /etc/iptables/filter in Ubuntu and want to reload them. I read the man page and also googled but couldn't find the information. Any help will be appreciated.










share|improve this question















migrated from stackoverflow.com Dec 30 '11 at 0:33


This question came from our site for professional and enthusiast programmers.
















  • You have neither provided any information about the version of Ubuntu you are using, nor searched the web well, before posting this question.

    – Puspendu Banerjee
    Dec 6 '10 at 18:35














24












24








24


8






I made changes to iptables config file in /etc/iptables/filter in Ubuntu and want to reload them. I read the man page and also googled but couldn't find the information. Any help will be appreciated.










share|improve this question
















I made changes to iptables config file in /etc/iptables/filter in Ubuntu and want to reload them. I read the man page and also googled but couldn't find the information. Any help will be appreciated.







services iptables






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 18 '16 at 3:35









techraf

2,77092035




2,77092035










asked Dec 6 '10 at 18:11







Raccha











migrated from stackoverflow.com Dec 30 '11 at 0:33


This question came from our site for professional and enthusiast programmers.






migrated from stackoverflow.com Dec 30 '11 at 0:33


This question came from our site for professional and enthusiast programmers.















  • You have neither provided any information about the version of Ubuntu you are using, nor searched the web well, before posting this question.

    – Puspendu Banerjee
    Dec 6 '10 at 18:35



















  • You have neither provided any information about the version of Ubuntu you are using, nor searched the web well, before posting this question.

    – Puspendu Banerjee
    Dec 6 '10 at 18:35

















You have neither provided any information about the version of Ubuntu you are using, nor searched the web well, before posting this question.

– Puspendu Banerjee
Dec 6 '10 at 18:35





You have neither provided any information about the version of Ubuntu you are using, nor searched the web well, before posting this question.

– Puspendu Banerjee
Dec 6 '10 at 18:35










6 Answers
6






active

oldest

votes


















23














Easiest way is to reboot (also if below does not work, reboot, check if that made the change).



Second easiest is to restart the daemons using iptables configurations (google: restart daemon ubuntu).



examples (depends your configuration):



/etc/init.d/iptables restart  

/etc/init.d/networking restart

/etc/init.d/firewall restart





share|improve this answer





















  • 2





    There is no file by name /etc/init.d/iptables

    – Raccha
    Dec 6 '10 at 18:19






  • 1





    what network related exists in /etc/init.d ? try to restart that.

    – Juha
    Dec 6 '10 at 18:20











  • /etc/init.d/networking restart?

    – Juha
    Dec 6 '10 at 18:22






  • 1





    Dead link is dead.

    – Dustin Graham
    Mar 14 '14 at 17:45











  • @DustinGraham thanks, the broken link is removed.

    – Juha
    Mar 17 '14 at 15:42



















31














Normally your firewall rules are in the config file /etc/iptables.firewall.rules



To activate the rules defined in your file you must send them to iptables-restore (you can use another file if you want):



sudo iptables-restore < /etc/iptables.firewall.rules


And you can check that they are activated with:



sudo iptables -L


If you want to activate the same rules each time you boot the computer create this file:



sudo nano /etc/network/if-pre-up.d/firewall


With this content:



#!/bin/sh
/sbin/iptables-restore < /etc/iptables.firewall.rules


And give it permission of execution:



sudo chmod +x /etc/network/if-pre-up.d/firewall


Hope it helps you =)



Example file for /etc/iptables.firewall.rules:



*filter

# Allow all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
-A INPUT -i lo -j ACCEPT
-A INPUT -d 127.0.0.0/8 -j REJECT

# Accept all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# Allow all outbound traffic - you can modify this to only allow certain traffic
-A OUTPUT -j ACCEPT

# Allow HTTP and HTTPS connections from anywhere (the normal ports for websites and SSL).
-A INPUT -p tcp --dport 80 -j ACCEPT
-A INPUT -p tcp --dport 443 -j ACCEPT

# Allow SSH connections
#
# The -dport number should be the same port number you set in sshd_config
#
-A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT

# Allow ping
-A INPUT -p icmp -j ACCEPT

# Log iptables denied calls
-A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7

# Drop all other inbound - default deny unless explicitly allowed policy
-A INPUT -j DROP
-A FORWARD -j DROP

COMMIT





share|improve this answer





















  • 4





    On Ubuntu 14.10 I have no /etc/iptables.firewall.rules but sudo iptables-restore < /etc/iptables/rules.v4 worked for me.

    – timbo
    Jan 9 '15 at 22:43





















3














If you've executed your rules they are already running and no reloading is necessary. In case where you have a configuration file but it hasn't been executed best way I've seen so far is to use iptables-apply (an iptables extension).



iptables-apply -t 60 your_rules_file


This will apply the rules for 60 seconds (10 by default) and revert them if you don't confirm them. This will save you in case you are thrown out of the system because of the rules (ex. if you are operating through ssh).



You can use the following as a replacement:



iptables-restore < your_rules_file; sleep 60; iptables-restore < clean_rules





share|improve this answer

































    0














    After googling a little, this is what i found to restart iptables. . .
    sudo /etc/init.d/firewall restart






    share|improve this answer



















    • 2





      There is no file by name /etc/init.d/firewall

      – Raccha
      Dec 6 '10 at 18:16



















    0














    If you want to reload IPtables to validate changes you have just made; you can also restart Apache with the command lines below:



    /etc/init.d/apache2 stop



    /etc/init.d/apache2 start



    These command may vary depending on your flavor of Ubuntu, and eventual modifications that may have been made previously.



    Hope this helps.



    Pierre






    share|improve this answer































      0














      sudo ufw reload



      Will reload firewall and its rules.





      share























        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "89"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f91413%2freloading-iptables%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown
























        6 Answers
        6






        active

        oldest

        votes








        6 Answers
        6






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        23














        Easiest way is to reboot (also if below does not work, reboot, check if that made the change).



        Second easiest is to restart the daemons using iptables configurations (google: restart daemon ubuntu).



        examples (depends your configuration):



        /etc/init.d/iptables restart  

        /etc/init.d/networking restart

        /etc/init.d/firewall restart





        share|improve this answer





















        • 2





          There is no file by name /etc/init.d/iptables

          – Raccha
          Dec 6 '10 at 18:19






        • 1





          what network related exists in /etc/init.d ? try to restart that.

          – Juha
          Dec 6 '10 at 18:20











        • /etc/init.d/networking restart?

          – Juha
          Dec 6 '10 at 18:22






        • 1





          Dead link is dead.

          – Dustin Graham
          Mar 14 '14 at 17:45











        • @DustinGraham thanks, the broken link is removed.

          – Juha
          Mar 17 '14 at 15:42
















        23














        Easiest way is to reboot (also if below does not work, reboot, check if that made the change).



        Second easiest is to restart the daemons using iptables configurations (google: restart daemon ubuntu).



        examples (depends your configuration):



        /etc/init.d/iptables restart  

        /etc/init.d/networking restart

        /etc/init.d/firewall restart





        share|improve this answer





















        • 2





          There is no file by name /etc/init.d/iptables

          – Raccha
          Dec 6 '10 at 18:19






        • 1





          what network related exists in /etc/init.d ? try to restart that.

          – Juha
          Dec 6 '10 at 18:20











        • /etc/init.d/networking restart?

          – Juha
          Dec 6 '10 at 18:22






        • 1





          Dead link is dead.

          – Dustin Graham
          Mar 14 '14 at 17:45











        • @DustinGraham thanks, the broken link is removed.

          – Juha
          Mar 17 '14 at 15:42














        23












        23








        23







        Easiest way is to reboot (also if below does not work, reboot, check if that made the change).



        Second easiest is to restart the daemons using iptables configurations (google: restart daemon ubuntu).



        examples (depends your configuration):



        /etc/init.d/iptables restart  

        /etc/init.d/networking restart

        /etc/init.d/firewall restart





        share|improve this answer















        Easiest way is to reboot (also if below does not work, reboot, check if that made the change).



        Second easiest is to restart the daemons using iptables configurations (google: restart daemon ubuntu).



        examples (depends your configuration):



        /etc/init.d/iptables restart  

        /etc/init.d/networking restart

        /etc/init.d/firewall restart






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Aug 18 '16 at 3:35









        techraf

        2,77092035




        2,77092035










        answered Dec 6 '10 at 18:17









        JuhaJuha

        36215




        36215








        • 2





          There is no file by name /etc/init.d/iptables

          – Raccha
          Dec 6 '10 at 18:19






        • 1





          what network related exists in /etc/init.d ? try to restart that.

          – Juha
          Dec 6 '10 at 18:20











        • /etc/init.d/networking restart?

          – Juha
          Dec 6 '10 at 18:22






        • 1





          Dead link is dead.

          – Dustin Graham
          Mar 14 '14 at 17:45











        • @DustinGraham thanks, the broken link is removed.

          – Juha
          Mar 17 '14 at 15:42














        • 2





          There is no file by name /etc/init.d/iptables

          – Raccha
          Dec 6 '10 at 18:19






        • 1





          what network related exists in /etc/init.d ? try to restart that.

          – Juha
          Dec 6 '10 at 18:20











        • /etc/init.d/networking restart?

          – Juha
          Dec 6 '10 at 18:22






        • 1





          Dead link is dead.

          – Dustin Graham
          Mar 14 '14 at 17:45











        • @DustinGraham thanks, the broken link is removed.

          – Juha
          Mar 17 '14 at 15:42








        2




        2





        There is no file by name /etc/init.d/iptables

        – Raccha
        Dec 6 '10 at 18:19





        There is no file by name /etc/init.d/iptables

        – Raccha
        Dec 6 '10 at 18:19




        1




        1





        what network related exists in /etc/init.d ? try to restart that.

        – Juha
        Dec 6 '10 at 18:20





        what network related exists in /etc/init.d ? try to restart that.

        – Juha
        Dec 6 '10 at 18:20













        /etc/init.d/networking restart?

        – Juha
        Dec 6 '10 at 18:22





        /etc/init.d/networking restart?

        – Juha
        Dec 6 '10 at 18:22




        1




        1





        Dead link is dead.

        – Dustin Graham
        Mar 14 '14 at 17:45





        Dead link is dead.

        – Dustin Graham
        Mar 14 '14 at 17:45













        @DustinGraham thanks, the broken link is removed.

        – Juha
        Mar 17 '14 at 15:42





        @DustinGraham thanks, the broken link is removed.

        – Juha
        Mar 17 '14 at 15:42













        31














        Normally your firewall rules are in the config file /etc/iptables.firewall.rules



        To activate the rules defined in your file you must send them to iptables-restore (you can use another file if you want):



        sudo iptables-restore < /etc/iptables.firewall.rules


        And you can check that they are activated with:



        sudo iptables -L


        If you want to activate the same rules each time you boot the computer create this file:



        sudo nano /etc/network/if-pre-up.d/firewall


        With this content:



        #!/bin/sh
        /sbin/iptables-restore < /etc/iptables.firewall.rules


        And give it permission of execution:



        sudo chmod +x /etc/network/if-pre-up.d/firewall


        Hope it helps you =)



        Example file for /etc/iptables.firewall.rules:



        *filter

        # Allow all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
        -A INPUT -i lo -j ACCEPT
        -A INPUT -d 127.0.0.0/8 -j REJECT

        # Accept all established inbound connections
        -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

        # Allow all outbound traffic - you can modify this to only allow certain traffic
        -A OUTPUT -j ACCEPT

        # Allow HTTP and HTTPS connections from anywhere (the normal ports for websites and SSL).
        -A INPUT -p tcp --dport 80 -j ACCEPT
        -A INPUT -p tcp --dport 443 -j ACCEPT

        # Allow SSH connections
        #
        # The -dport number should be the same port number you set in sshd_config
        #
        -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT

        # Allow ping
        -A INPUT -p icmp -j ACCEPT

        # Log iptables denied calls
        -A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7

        # Drop all other inbound - default deny unless explicitly allowed policy
        -A INPUT -j DROP
        -A FORWARD -j DROP

        COMMIT





        share|improve this answer





















        • 4





          On Ubuntu 14.10 I have no /etc/iptables.firewall.rules but sudo iptables-restore < /etc/iptables/rules.v4 worked for me.

          – timbo
          Jan 9 '15 at 22:43


















        31














        Normally your firewall rules are in the config file /etc/iptables.firewall.rules



        To activate the rules defined in your file you must send them to iptables-restore (you can use another file if you want):



        sudo iptables-restore < /etc/iptables.firewall.rules


        And you can check that they are activated with:



        sudo iptables -L


        If you want to activate the same rules each time you boot the computer create this file:



        sudo nano /etc/network/if-pre-up.d/firewall


        With this content:



        #!/bin/sh
        /sbin/iptables-restore < /etc/iptables.firewall.rules


        And give it permission of execution:



        sudo chmod +x /etc/network/if-pre-up.d/firewall


        Hope it helps you =)



        Example file for /etc/iptables.firewall.rules:



        *filter

        # Allow all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
        -A INPUT -i lo -j ACCEPT
        -A INPUT -d 127.0.0.0/8 -j REJECT

        # Accept all established inbound connections
        -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

        # Allow all outbound traffic - you can modify this to only allow certain traffic
        -A OUTPUT -j ACCEPT

        # Allow HTTP and HTTPS connections from anywhere (the normal ports for websites and SSL).
        -A INPUT -p tcp --dport 80 -j ACCEPT
        -A INPUT -p tcp --dport 443 -j ACCEPT

        # Allow SSH connections
        #
        # The -dport number should be the same port number you set in sshd_config
        #
        -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT

        # Allow ping
        -A INPUT -p icmp -j ACCEPT

        # Log iptables denied calls
        -A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7

        # Drop all other inbound - default deny unless explicitly allowed policy
        -A INPUT -j DROP
        -A FORWARD -j DROP

        COMMIT





        share|improve this answer





















        • 4





          On Ubuntu 14.10 I have no /etc/iptables.firewall.rules but sudo iptables-restore < /etc/iptables/rules.v4 worked for me.

          – timbo
          Jan 9 '15 at 22:43
















        31












        31








        31







        Normally your firewall rules are in the config file /etc/iptables.firewall.rules



        To activate the rules defined in your file you must send them to iptables-restore (you can use another file if you want):



        sudo iptables-restore < /etc/iptables.firewall.rules


        And you can check that they are activated with:



        sudo iptables -L


        If you want to activate the same rules each time you boot the computer create this file:



        sudo nano /etc/network/if-pre-up.d/firewall


        With this content:



        #!/bin/sh
        /sbin/iptables-restore < /etc/iptables.firewall.rules


        And give it permission of execution:



        sudo chmod +x /etc/network/if-pre-up.d/firewall


        Hope it helps you =)



        Example file for /etc/iptables.firewall.rules:



        *filter

        # Allow all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
        -A INPUT -i lo -j ACCEPT
        -A INPUT -d 127.0.0.0/8 -j REJECT

        # Accept all established inbound connections
        -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

        # Allow all outbound traffic - you can modify this to only allow certain traffic
        -A OUTPUT -j ACCEPT

        # Allow HTTP and HTTPS connections from anywhere (the normal ports for websites and SSL).
        -A INPUT -p tcp --dport 80 -j ACCEPT
        -A INPUT -p tcp --dport 443 -j ACCEPT

        # Allow SSH connections
        #
        # The -dport number should be the same port number you set in sshd_config
        #
        -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT

        # Allow ping
        -A INPUT -p icmp -j ACCEPT

        # Log iptables denied calls
        -A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7

        # Drop all other inbound - default deny unless explicitly allowed policy
        -A INPUT -j DROP
        -A FORWARD -j DROP

        COMMIT





        share|improve this answer















        Normally your firewall rules are in the config file /etc/iptables.firewall.rules



        To activate the rules defined in your file you must send them to iptables-restore (you can use another file if you want):



        sudo iptables-restore < /etc/iptables.firewall.rules


        And you can check that they are activated with:



        sudo iptables -L


        If you want to activate the same rules each time you boot the computer create this file:



        sudo nano /etc/network/if-pre-up.d/firewall


        With this content:



        #!/bin/sh
        /sbin/iptables-restore < /etc/iptables.firewall.rules


        And give it permission of execution:



        sudo chmod +x /etc/network/if-pre-up.d/firewall


        Hope it helps you =)



        Example file for /etc/iptables.firewall.rules:



        *filter

        # Allow all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
        -A INPUT -i lo -j ACCEPT
        -A INPUT -d 127.0.0.0/8 -j REJECT

        # Accept all established inbound connections
        -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

        # Allow all outbound traffic - you can modify this to only allow certain traffic
        -A OUTPUT -j ACCEPT

        # Allow HTTP and HTTPS connections from anywhere (the normal ports for websites and SSL).
        -A INPUT -p tcp --dport 80 -j ACCEPT
        -A INPUT -p tcp --dport 443 -j ACCEPT

        # Allow SSH connections
        #
        # The -dport number should be the same port number you set in sshd_config
        #
        -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT

        # Allow ping
        -A INPUT -p icmp -j ACCEPT

        # Log iptables denied calls
        -A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7

        # Drop all other inbound - default deny unless explicitly allowed policy
        -A INPUT -j DROP
        -A FORWARD -j DROP

        COMMIT






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 20 '17 at 12:44

























        answered Jan 14 '13 at 17:40









        Jorge SampayoJorge Sampayo

        44147




        44147








        • 4





          On Ubuntu 14.10 I have no /etc/iptables.firewall.rules but sudo iptables-restore < /etc/iptables/rules.v4 worked for me.

          – timbo
          Jan 9 '15 at 22:43
















        • 4





          On Ubuntu 14.10 I have no /etc/iptables.firewall.rules but sudo iptables-restore < /etc/iptables/rules.v4 worked for me.

          – timbo
          Jan 9 '15 at 22:43










        4




        4





        On Ubuntu 14.10 I have no /etc/iptables.firewall.rules but sudo iptables-restore < /etc/iptables/rules.v4 worked for me.

        – timbo
        Jan 9 '15 at 22:43







        On Ubuntu 14.10 I have no /etc/iptables.firewall.rules but sudo iptables-restore < /etc/iptables/rules.v4 worked for me.

        – timbo
        Jan 9 '15 at 22:43













        3














        If you've executed your rules they are already running and no reloading is necessary. In case where you have a configuration file but it hasn't been executed best way I've seen so far is to use iptables-apply (an iptables extension).



        iptables-apply -t 60 your_rules_file


        This will apply the rules for 60 seconds (10 by default) and revert them if you don't confirm them. This will save you in case you are thrown out of the system because of the rules (ex. if you are operating through ssh).



        You can use the following as a replacement:



        iptables-restore < your_rules_file; sleep 60; iptables-restore < clean_rules





        share|improve this answer






























          3














          If you've executed your rules they are already running and no reloading is necessary. In case where you have a configuration file but it hasn't been executed best way I've seen so far is to use iptables-apply (an iptables extension).



          iptables-apply -t 60 your_rules_file


          This will apply the rules for 60 seconds (10 by default) and revert them if you don't confirm them. This will save you in case you are thrown out of the system because of the rules (ex. if you are operating through ssh).



          You can use the following as a replacement:



          iptables-restore < your_rules_file; sleep 60; iptables-restore < clean_rules





          share|improve this answer




























            3












            3








            3







            If you've executed your rules they are already running and no reloading is necessary. In case where you have a configuration file but it hasn't been executed best way I've seen so far is to use iptables-apply (an iptables extension).



            iptables-apply -t 60 your_rules_file


            This will apply the rules for 60 seconds (10 by default) and revert them if you don't confirm them. This will save you in case you are thrown out of the system because of the rules (ex. if you are operating through ssh).



            You can use the following as a replacement:



            iptables-restore < your_rules_file; sleep 60; iptables-restore < clean_rules





            share|improve this answer















            If you've executed your rules they are already running and no reloading is necessary. In case where you have a configuration file but it hasn't been executed best way I've seen so far is to use iptables-apply (an iptables extension).



            iptables-apply -t 60 your_rules_file


            This will apply the rules for 60 seconds (10 by default) and revert them if you don't confirm them. This will save you in case you are thrown out of the system because of the rules (ex. if you are operating through ssh).



            You can use the following as a replacement:



            iptables-restore < your_rules_file; sleep 60; iptables-restore < clean_rules






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jul 6 '15 at 12:34

























            answered Jul 6 '15 at 12:28









            nyxznyxz

            1294




            1294























                0














                After googling a little, this is what i found to restart iptables. . .
                sudo /etc/init.d/firewall restart






                share|improve this answer



















                • 2





                  There is no file by name /etc/init.d/firewall

                  – Raccha
                  Dec 6 '10 at 18:16
















                0














                After googling a little, this is what i found to restart iptables. . .
                sudo /etc/init.d/firewall restart






                share|improve this answer



















                • 2





                  There is no file by name /etc/init.d/firewall

                  – Raccha
                  Dec 6 '10 at 18:16














                0












                0








                0







                After googling a little, this is what i found to restart iptables. . .
                sudo /etc/init.d/firewall restart






                share|improve this answer













                After googling a little, this is what i found to restart iptables. . .
                sudo /etc/init.d/firewall restart







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 6 '10 at 18:15







                bmarti44















                • 2





                  There is no file by name /etc/init.d/firewall

                  – Raccha
                  Dec 6 '10 at 18:16














                • 2





                  There is no file by name /etc/init.d/firewall

                  – Raccha
                  Dec 6 '10 at 18:16








                2




                2





                There is no file by name /etc/init.d/firewall

                – Raccha
                Dec 6 '10 at 18:16





                There is no file by name /etc/init.d/firewall

                – Raccha
                Dec 6 '10 at 18:16











                0














                If you want to reload IPtables to validate changes you have just made; you can also restart Apache with the command lines below:



                /etc/init.d/apache2 stop



                /etc/init.d/apache2 start



                These command may vary depending on your flavor of Ubuntu, and eventual modifications that may have been made previously.



                Hope this helps.



                Pierre






                share|improve this answer




























                  0














                  If you want to reload IPtables to validate changes you have just made; you can also restart Apache with the command lines below:



                  /etc/init.d/apache2 stop



                  /etc/init.d/apache2 start



                  These command may vary depending on your flavor of Ubuntu, and eventual modifications that may have been made previously.



                  Hope this helps.



                  Pierre






                  share|improve this answer


























                    0












                    0








                    0







                    If you want to reload IPtables to validate changes you have just made; you can also restart Apache with the command lines below:



                    /etc/init.d/apache2 stop



                    /etc/init.d/apache2 start



                    These command may vary depending on your flavor of Ubuntu, and eventual modifications that may have been made previously.



                    Hope this helps.



                    Pierre






                    share|improve this answer













                    If you want to reload IPtables to validate changes you have just made; you can also restart Apache with the command lines below:



                    /etc/init.d/apache2 stop



                    /etc/init.d/apache2 start



                    These command may vary depending on your flavor of Ubuntu, and eventual modifications that may have been made previously.



                    Hope this helps.



                    Pierre







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Oct 1 '17 at 10:41









                    Pierre Alexis MalavalPierre Alexis Malaval

                    11




                    11























                        0














                        sudo ufw reload



                        Will reload firewall and its rules.





                        share




























                          0














                          sudo ufw reload



                          Will reload firewall and its rules.





                          share


























                            0












                            0








                            0







                            sudo ufw reload



                            Will reload firewall and its rules.





                            share













                            sudo ufw reload



                            Will reload firewall and its rules.






                            share











                            share


                            share










                            answered 4 mins ago









                            cryptoboycryptoboy

                            388310




                            388310






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Ask Ubuntu!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f91413%2freloading-iptables%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                GameSpot

                                connect to host localhost port 22: Connection refused

                                Getting a Wifi WPA2 wifi connection