[SOLVED] How to restart iptables service in Debian?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Correct. It is impossible in all Linux-based operating systems, not just Debian GNU/Linux. See the various comments above for different phrasing of the same message.
There is no concept of "reload/restart" for this kernel ip fw "table".
This *table* is not a process, so it cannot be stopped/started/restarted
(like a data array in memory cannot be ditto)
I guess "ufw" using iptables with a friendly syntax. Is "ufw" flexible like iptables?
How about "firewall-cmd"?
UFW is just a front end for iptables. You can use it or GUFW, the graphical front end for UFW. But at the end of the day those are only making rules in iptables chains even if they are hidden behind the UFW / GUFW interfaces. It will provide some options but not many, especially compared to plain iptables.
firewall-cmd is more of the same, just more complex. In my opinion it is more complicated that plain iptables.
Either way, your best option for precision and flexibility is to take away all the extra levels of abstraction and obfuscation and use just plain iptables. So I'll ask again, what are you really trying to do?
UFW is just a front end for iptables. You can use it or GUFW, the graphical front end for UFW. But at the end of the day those are only making rules in iptables chains even if they are hidden behind the UFW / GUFW interfaces. It will provide some options but not many, especially compared to plain iptables.
firewall-cmd is more of the same, just more complex. In my opinion it is more complicated that plain iptables.
Either way, your best option for precision and flexibility is to take away all the extra levels of abstraction and obfuscation and use just plain iptables. So I'll ask again, what are you really trying to do?
It appears this thread was just a matter of using the correct terminology.
Only separate programs can be "restarted". iptables is part of the kernel, not a separate program. It is a list that can be "cleared" but not "restarted". Instructions in how to clear iptables were given in #5 and #9 above.
Same goes for "crash". iptables cannot crash or rather if it does it will take the kernel, and thus the whole system, down with it. You can however fill up iptable chains with rules that will completely block your network access.
If in doubt about all that see the manual page for iptables itself.
Code:
man iptables
When you ask about iptables in the future, remember to use the relevant terminology.
We can argue over what is actually happening when restarting but for all intents and purposes you are getting the expected behavior when restarting. It removes all iptables rules and then loads the saved rules. Not sure about Debian but on RH/CE I think it reloads iptables kernel modules.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.