Replies: 2 comments 1 reply
This sounds correct for a relatively modern Ubuntu version.
I can't make a comprehensive comparative writeup here (and there is enough available info online) but I'll write what I think is most important for geoip-shell. Both iptables and nftables are essentially an interface with the kernel
The interactive setup procedure has to balance verbosity/completeness with usability and code compactness. As geoip-shell has a lot of options, walking the user through every possible configuration option would be too much both for the user and for the code base. I agree that the firewall backend is an important configuration aspect, which is why I implemented a dialog which allows the user to select one. With the current implementation, that dialog is skipped when only one firewall backend is available (and as far as geoip-shell is concerned, iptables firewall backend consists of iptables+ipset). The reason is I believe that a large majority of users don't want to bother with thinking about the firewall backend, and probably many don't have the domain knowledge about this. I think that the average user just wants to get the setup over with, so the setup procedure is optimized for that. I did implement specific messages printed at the first setup which explicitly says which firewall backend is being used, including in one of the last printed lines, in order to make this more visible. So users who have the time and the interest to think about the firewall backend get the opportunity and the reminder to do so. The configured backend is also specifically printed in the If you have a good argument why this behavior should be changed, I am ready to hear it. |
|
Thanks a lot for such a detailed answer.
Since you were conducting tests with iptables-nft, I assume there will be no problems with using iptables-nft rules of geoip-shell? It seems to make more sense to use nftables directly but there are other applications that are using iptables-nft in my setup, so it would be nice to have a consistency.
A perfectly valid point. I just thought that if someone has both iptables and nftables installed there must be a reason for that, thus the abscense of ipset might be an oversight on user's side. As you pointed, the system provides all the info about setup and reconfiguration process takes very little time, so it's indeed not a big deal. |
Uh oh!
There was an error while loading. Please reload this page.
To my limited knowledge, Ubuntu is using both iptables and nftables, where iptables rules are being translated to nftables rules using iptables-nft. Since both iptables and nftables can be used with geoip-shell, what firewall backend should be used on Ubuntu and are there any problems with using one over another?
As a side note, perhaps it would make sense to interrupt configuration process with a warning in case iptables are detected and ipset is not installed instead of just jumping to nftables? During my first installation attempt I didn't bother to check whether an ipset package was present, which resulted in nftables being used.
All reactions