-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace iptables with nftables #71
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR. I will start reviewing this tomorrow and hopefully get the nftables support ready in June. |
Sorry, I didn't check openvpn and forgot to add forward rules for it. Also changed nft to use custom chains. |
@1cho1ce - I have been trying to use your forked version on Qubes 4.2 and after a lot of trying, I couldn't get it to work with Fedora templates, but eventually when I changed to a Debian 11 template it worked fine. I do have one problem though, I was previously (on 4.1) using edited qubes-firewall-user-script & rc.local to allow local network access (192.168.150.0/24 in my case). I have copied & adjusted these as below but can't get any lan access now:
TBH - I'm not very familiar with nft & edited the iptables-I FORWARD rules above using iptables-translate. Has anyone got local access working on 4.2 with nft? |
I've fixed this issue with Fedora template.
You can replace these iptables rules:
With these nftables rules:
|
Is this pull request in good working order? Has it been deemed insufficient? I am just wondering what further needs to be done in order to create a working solution. I am not yet familiar with nftables rules, but I will research and see if I can help if something is missing. |
Also would like to know if this PR works, I just need to be able to VPN with 4.2 |
This PR worked out of the box for me - many thanks. Not tested failure modes. Running on debian-12-minimal. [ed] My best guess that seems to be working - in a file in qubes-firewall.d: |
… virtual DNS servers if multiple DNS servers are specified
There are a few errors in the PR with allowing traffic from VPN to qubes and typos related to IPv6. Here is a patch:
You can apply the patch using this command:
Additional notes: |
Qubes dropped iptables support and replaced it with nftables:
QubesOS/qubes-core-agent-linux@28b9553
This pull request replaces iptables with nftables.
Removed
allow established input
rules fromproxy-firewall-restrict
since they are already present in nft tables ip/ip6 qubes.TODO: Need to think of a better way to check in
--check-firewall
inqubes-vpn-setup
script if the forward drop rules are present (orproxy-firewall-restrict
script finished successfully).