Score:0

how to use firewalld in stateful mode

jp flag

I have to setup an stateful firewall on centos8 using firewalld. I'm new to firewalld but have experience with old style iptables for this purpose.
since it is recommended by Redhat here I prefer to not combine two methods like firewalld and iptables.
I want to know is there a way to use firewalld in stateful mode? if it is how?

thank you

Hamid Farahani avatar
jp flag
@A.B No I didn't. would you please explain more? or share any link for this? I couldn't find anything about that.
Hamid Farahani avatar
jp flag
I've already checked that, didn't help.
Score:1
jp flag

thanks to setenforce 1 and his excellent answer here.

Firewalld configures iptables or nftables, and the resulting configuration is stateful (based on connstate status: established, related, untrack, invalid, new).

You can check the actual configuration with iptables -L -n -v and nft list ruleset.

You can choose which backend you want to use in /etc/firewalld/firewalld.conf with the option FirewallBackend. If you want Firewalld to use iptables, you have to set: FirewallBackend=iptables

If you want to disable Firewalld to use you standard iptables configurations, you can use:

systemctl disable firewalld --now
systemctl mask firewalld

hope it helps for others.
Paul avatar
cn flag
Welcome to Server Fault! Your answer suggests a workable solution to the question is available via another website. The Stack Exchange family of Q&A websites [generally frowns on this type of answer](https://meta.stackexchange.com/questions/8231/are-answers-that-just-contain-links-elsewhere-really-good-answers), even when the link is to another SE site. Please read [How do I write a good answer?](http://serverfault.com/help/how-to-answer) and consider revising your answer to include the steps required to resolve the issue.
Hamid Farahani avatar
jp flag
@Paul thank you . I've edited that.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.