Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Add nftables support (instead of iptables) #349

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

golinski
Copy link

@golinski golinski commented Jul 11, 2018

This pull requests adds support for a 'nat' internet sharing method that uses nftables, not iptables.

Rationale

Both are an interface to the same netfilter underlying infrastructure, but unfortunately they cannot be used at the same time. When nft_nat module is loaded one gets the following errors:

# create_ap --ieee80211n wlp0s20u8 eno1 bss password
Config dir: /tmp/create_ap.wlp0s20u8.conf.Y3U9GuLq
PID: 13036
Creating a virtual WiFi interface... ap0 created.
Network Manager found, set ap0 as unmanaged device... DONE
Sharing Internet using method: nat
iptables v1.6.2: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
# modprobe iptable_nat 
modprobe: ERROR: could not insert 'iptable_nat': Device or resource busy

@TheTumultuousUnicornOfDarkness

I use nftables me too. This patch works for me, thank you @golinski!
I really hope this PR will be merged. 🙂

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants