Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've been using a computer as a router for over a decade, currently I'm using a very clean install of Debian 9 with ip(6)tables for that. If I update it to Debian 10, nftables will become the standard firewall.
Since I'm new with nftables (though I've read quite a bit), what would be the best way to switch from ip(6)tables to nftables?
Last edited by bartgrefte; 08-08-2019 at 08:45 AM.
Unfortunately the translation tool doesn't recognize everything, something as simple as -P INPUT DROP for example, iptables-translate doesn't have a clue... The forwarding ports rules are translated without problems.
This morning I installed Debian Buster in a virtual machine, for some reason it still accepts iptables rules, thought nftables was default.
Last edited by bartgrefte; 08-14-2019 at 08:25 AM.
Unfortunately the translation tool doesn't recognize everything, something as simple as -P INPUT DROP for example, iptables-translate doesn't have a clue... The forwarding ports rules are translated without problems.
This morning I installed Debian Buster in a virtual machine, for some reason it still accepts iptables rules, thought nftables was default.
You can definitely still use iptables if you don’t want to learn nftables. The syntax is much different as you know but if your iptables config works, why change it?
If I’m not mistaken the biggest difference (aside from syntax of course) is that nftables includes arptables, ipv6tables and ebtables. Unless you’re using those other ones and having to configure those apart from iptables I see no huge advantage in switching. But I’m not super familiar with what else nftables does that iptables doesn’t.
You can definitely still use iptables if you don’t want to learn nftables. The syntax is much different as you know but if your iptables config works, why change it?
Well, if nftables ends up becoming the only option at some point, I might as well be prepared. Otherwise I would just be postponing the switch.
Anyway, I think I've found nftables-translations for all the rules, now I just have to figure out how to put every thing together. Since it's not a client firewall but for a router, it seems I need tables for ip, ip6 and nat. Using inet seems pointless since IPv4 and IPv6 don't use the same interface, got an IPv6-tunnel.
edit: Hmm, found a command that saves the rules into the file that's automatically loaded when nftables is, but keep getting permission denied:
Code:
nft list ruleset > /etc/nftables.conf
(sudo doesn't make a difference)
edit2: Rewrote that to
Code:
sudo sh -c “nft list ruleset > /etc/nftables.conf”
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.