LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-02-2021, 06:17 AM   #1
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
firewalld not working at all on alma/rocky linux 8.5


I've installed both alma and rocky linux (in case something might be different), and I can't seem to get firewalld working.
Code:
[root@alma-router zones]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2021-12-02 06:31:07 EST; 35min ago

[root@alma-router zones]# firewall-cmd --state
running

[root@alma-router zones]# ip a
[..]
2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    inet 192.168.111.66/24 brd 192.168.111.255 scope global dynamic noprefixroute ens18
[..]
3: ens19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    inet 10.10.111.2/24 brd 10.10.111.255 scope global noprefixroute ens19
ens18 is associated with the external zone and ens19 with the internal one:
Code:
[root@alma-router zones]# firewall-cmd --zone=external --list-all
external (active)
  target: default
  icmp-block-inversion: no
  interfaces: ens18
  sources:
  services:
  ports:
  protocols:
  forward: no
  masquerade: yes
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:

[root@alma-router zones]# firewall-cmd --zone=internal --list-all
internal (active)
  target: default
  icmp-block-inversion: no
  interfaces: ens19
  sources:
  services: cockpit dhcpv6-client mdns samba-client ssh
  ports:
  protocols:
  forward: no
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:
there's nothing in the iptables chains (but you can see that packets have traversed the rules):
Code:
[root@alma-router zones]# iptables -vnL
Chain INPUT (policy ACCEPT 1878 packets, 113K bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 513 packets, 56552 bytes)
 pkts bytes target     prot opt in     out     source               destination


[root@alma-router zones]# iptables -t nat -vnL
Chain PREROUTING (policy ACCEPT 2758 packets, 295K bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain INPUT (policy ACCEPT 3 packets, 747 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING (policy ACCEPT 8 packets, 608 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 8 packets, 608 bytes)
 pkts bytes target     prot opt in     out     source               destination
nftables (if anyone is inclined to reference them, although I think firewalld still uses the iptables command, even if nftables is being used eventually) also doesn't show anything:

Code:
[root@alma-router zones]# nft list table ip filter
table ip filter {
	chain INPUT {
		type filter hook input priority filter; policy accept;
	}

	chain FORWARD {
		type filter hook forward priority filter; policy accept;
	}

	chain OUTPUT {
		type filter hook output priority filter; policy accept;
	}
}
I remember that in Centos 7 firewalld was also on by default and you could see from the very beginning that there was a structure there.

This has nothing to do with the runtime/permanent rules. I've tested this, nothing changes, only firewalld itself registers.

Any ideas are welcome!
 
Old 12-02-2021, 06:22 AM   #2
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Original Poster
Rep: Reputation: 103Reputation: 103
Yeah, I got a little bit ahead of myself, although I did search quite a lot, but I missed something, that is to say, how to actually show the nftables rules:
Code:
nftables list ruleset
It's all there So indeed, firewalld does use nftables directly.
 
  


Reply

Tags
centos, firewalld, rhel8



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Alma and Rocky Linux release 8.5 builds, Rocky catches up with secure boot LXer Syndicated Linux News 0 11-17-2021 11:15 AM
LXer: How to Install OpenLiteSpeed Webserver on Alma Linux 8 LXer Syndicated Linux News 0 10-30-2021 12:47 AM
LXer: How to Install Fail2ban with Firewalld on Rocky Linux 8 LXer Syndicated Linux News 0 08-24-2021 06:21 PM
LXer: How to Install Fail2ban with Firewalld on Rocky Linux 8.4 LXer Syndicated Linux News 0 08-06-2021 06:00 PM
planning proposal to alma mater school board to sell the idea of open-source software poiesis Linux - Newbie 6 03-31-2009 11:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration