This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2023436 - [RFE] Add nftables support to netavark
Summary: [RFE] Add nftables support to netavark
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: netavark
Version: 8.5
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Brent Baude
QA Contact: David Darrah/Red Hat QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-15 17:28 UTC by Sameer
Modified: 2024-01-27 04:25 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-11 18:35:59 UTC
Type: Story
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2188083 1 None None None 2023-06-22 00:13:24 UTC
Red Hat Issue Tracker   RHEL-3088 0 None Migrated None 2023-09-11 18:36:04 UTC
Red Hat Issue Tracker RHELPLAN-102827 0 None None None 2021-11-15 17:54:39 UTC

Internal Links: 2188083

Description Sameer 2021-11-15 17:28:05 UTC
Description of problem:

   Podman CNI is unable to use full nftables (not any iptables compatibility) to work cleanly.

Version-Release number of selected component (if applicable):

   - latest podman on RHEL 8

How reproducible:

   - 100% Reproducible

Steps to Reproduce:

1. Remove the existing firewalld and iptables packages and freshly install podman, nftables

   # yum remove -y firewalld iptables 
   # yum install -y podman nftables 
   # rpm -q podman nftables

2. Migrate existing containers to a new podman version.

   # podman system migrate
 
3. Create rules and inject to nft.

   # cat rulesets.txt 
	add table ip filter
	add chain ip filter INPUT { type filter hook input priority 0; policy drop; }
	add chain ip filter FORWARD { type filter hook forward priority 0; policy drop; }
	add rule ip filter INPUT ct state invalid tcp sport 5010 counter reject with tcp reset
	add rule ip filter INPUT tcp flags & (fin|syn|rst|psh|ack|urg) == fin|syn|rst|psh|ack|urg counter drop
	add rule ip filter INPUT tcp flags & (fin|syn) == fin|syn counter drop
	add rule ip filter INPUT tcp flags & (fin|rst) == fin|rst counter drop
	add rule ip filter INPUT tcp flags & (fin|syn|rst|psh|ack|urg) == fin|psh|urg counter drop
	add rule ip filter INPUT tcp flags & (fin|syn|rst|psh|ack|urg) == 0x0 counter drop
	add rule ip filter INPUT ct state related, established counter accept
	add rule ip filter INPUT iifname "lo" counter accept
	add rule ip filter INPUT ct state invalid counter drop
	add rule ip filter INPUT ct state new tcp flags & (syn|rst|ack) != syn counter drop
	add rule ip filter INPUT meta l4proto icmp icmp type timestamp-request counter drop
	add rule ip filter INPUT meta l4proto icmp icmp type address-mask-request counter drop
	add rule ip filter INPUT ip saddr 127.1.1.0/24 counter accept
	add rule ip filter INPUT ip saddr 127.0.0.0/8 counter drop
	add rule ip filter INPUT ip saddr 169.254.0.0/16 counter drop
	add rule ip filter INPUT ip saddr 192.0.2.0/24 counter drop
	add rule ip filter INPUT ip saddr 224.0.0.0/4 counter drop
	add rule ip filter INPUT ip saddr 240.0.0.0/5 counter drop
	add rule ip filter INPUT ip saddr 248.0.0.0/5 counter drop
	add rule ip filter INPUT meta l4proto icmp ip daddr 255.255.255.255 counter drop
	add rule ip filter INPUT meta l4proto icmp icmp type echo-request limit rate 100/second burst 5 packets counter accept
	add rule ip filter INPUT meta l4proto icmp counter drop
	add rule ip filter INPUT meta l4proto ipv6-icmp limit rate 100/second burst 5 packets counter accept
	add rule ip filter INPUT meta l4proto ipv6-icmp counter drop
	add rule ip filter INPUT tcp dport 22 tcp flags & (fin|syn|rst|psh|ack|urg) == syn counter accept
	add rule ip filter INPUT tcp dport 2222 tcp flags & (fin|syn|rst|psh|ack|urg) == syn counter accept
	add rule ip filter INPUT tcp dport 5022 tcp flags & (fin|syn|rst|psh|ack|urg) == syn counter accept
	add rule ip filter INPUT tcp dport 23 tcp flags & (fin|syn|rst|psh|ack|urg) == syn counter accept
	add rule ip filter INPUT tcp dport 5023 tcp flags & (fin|syn|rst|psh|ack|urg) == syn counter accept
	add rule ip filter INPUT tcp dport 80 tcp flags & (fin|syn|rst|psh|ack|urg) == syn counter accept
	add rule ip filter INPUT tcp dport 443 tcp flags & (fin|syn|rst|psh|ack|urg) == syn counter accept
	add rule ip filter INPUT ip daddr 0.0.0.0 udp sport 161 ip frag-off & 0x1fff != 0 counter accept
	add rule ip filter INPUT tcp dport { 22,2222,5022,23,5023,80,443} tcp flags & (fin|syn|rst|ack) == syn counter drop
	add rule ip filter INPUT ip protocol udp udp sport { 161,162} counter drop
	add rule ip filter INPUT ip protocol udp udp dport { 161,162} counter drop
	add rule ip filter INPUT ct state {new, related, established} tcp flags & (fin|syn|rst|psh|ack|urg) == syn counter accept
	add rule ip filter INPUT ct state {new, related, established} meta l4proto udp counter accept
	add chain ip filter OUTPUT { type filter hook output priority 0; policy drop; }
	add rule ip filter OUTPUT oifname "lo" counter accept
	add rule ip filter OUTPUT counter accept
	add rule ip filter OUTPUT udp sport 161 ip frag-off & 0x1fff != 0 counter accept

   # nft -f rulesets.txt

4. Try to create a test container and observe the error.

   # podman run -d --name nginx -p 80:80 docker.io/nginx


Actual results:

   # podman run -d --name nginx-1 -p 80:80 docker.io/nginx
ERRO[0000] error loading cached network config: network "podman" not found in CNI cache 
WARN[0000] falling back to loading from existing plugins on disk 
Error: error configuring network namespace for container 4376cfc0a24ca5f51676dd66462180aaf0bcc58e4c9df9301e379a2b6a30b270: error adding pod nginx-1_nginx-1 to CNI network "podman": failed to list iptables chains: running [/usr/sbin/iptables -t filter -S --wait]: exit status 1: iptables v1.8.2 (nf_tables): table `filter' is incompatible, use 'nft' tool.

Expected results:

Container should run properly using nftables rules

Additional info:

- We are aware of the bug (1984040) which was closed as WONTFIX, but this needs to be address this as CNI is unable to recognize nft as a default one.

Comment 1 Matthew Heon 2021-11-15 18:35:53 UTC
We are in the process of rewriting the Podman network stack, which should include nftables support. The rewrite itself will land in RHEL 8.6.0, but I don't know if nftables support will be present in the initial version due to time and testing concerns.

Comment 5 Matthew Heon 2022-02-21 14:51:50 UTC
Unsure how I cleared the dependent products, resetting...

Comment 31 Stefan Zwijsen 2023-06-21 09:01:24 UTC
Hi,

What is the status of this? Any date by when we can expect something?
Also, are the plans to support nftables in podman still with CNI and/or with netavark?

Thanks,
Stefan

Comment 32 Matthew Heon 2023-06-21 13:07:27 UTC
CNI has been deprecated in Podman upstream. There are no plans to do any further development with Podman and CNI. As such, this will be fixed in Netavark only.

Comment 33 Derrick Ornelas 2023-06-21 19:18:56 UTC
As discussed, I'm updating the title/summary to clarify that this is adding new functionality to podman/netavark. I'm leaving the component as podman, but feel free to change it to netavark if you feel that's more correct. I assume podman might need to be updated in some way to take advantage of whatever changes are going to go into netavark itself.

Comment 35 Tom Sweeney 2023-06-22 20:48:02 UTC
As this has been determined to be an RFE for Netavark, I'm assigning it to that component, and will also assign it to @bbaude so he can work with @mrussell to prioritize this addition.

Comment 42 RHEL Program Management 2023-09-11 18:32:30 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 43 RHEL Program Management 2023-09-11 18:35:59 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.

Comment 44 Red Hat Bugzilla 2024-01-27 04:25:10 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


Note You need to log in before you can comment on or make changes to this bug.