5 ms·
Can anyone recommend a decent book on linux firewalls, iptables and the like? Every time I wade into this I feel I'm missing to much base knowledge to make good
by yomlica8 3y ago
Can anyone recommend a decent book on linux firewalls, iptables and the like? Every time I wade into this I feel I'm missing to much base knowledge to make good decisions.
- CoastalCoder 3y agoI was about to ask a similar question. I don't know much about Linux networking. But recently I dove into it a little to let my laptop connect to my desktop via Ethernet (when present), but use Wifi for everything else. I got it working-ish using "nmtui". But I'm left pretty confused about the relationship between all the network-related tools / services / files. E.g., is "nmtui" just a convenience wrapper around thinks like iptables and resolved? Does it work around them? Which tools are mean to be used together, vs. which ones are redundant / incompatible? And then there's systemd as well.
- seba_dos1 3y agonmtui is just a console UI for NetworkManager. Similar UI is most likely provided by your desktop environment of choice as well. It has nothing to do with iptables.
- CoastalCoder 3y agoThanks, that's helpful. Any suggestion for something explaining how all these tools and service fit together (or don't)?
- seba_dos1 3y agoNot sure what exactly are you asking about. iptables/nftables is an interface for in-kernel packet filters. NetworkManager... well, manages your interfaces and connections. systemd-resolved/dnsmasq handle DNS. They mostly just do their own thing, with NM sometimes using the other ones as needed (for example, it will set forwarding rules up and run dnsmasq when you choose a "Shared to other computers" option in NM).
- nick__m 3y agoFor a complete but not up to date guide have a look at https://tldp.org/LDP/nag2/index.html https://tldp.org/LDP/nag2/index.html . And for more up-to-date but less complete guide https://wiki.archlinux.org/title/Network_configuration https://wiki.archlinux.org/title/Network_configuration .
- zokier 3y ago"Not up to date" is putting it mildly, idk if there is anything in nag2 that's still relevant these days; I get the feeling that it will just confuse more than inform at this point unless you already know the stuff and history.
- vaylian 3y agonmtui is a terminal user interface (tui) to control Network Manager (nm). Network Manager is a complete solution for networking that takes care of all the individual parts of networking. But as far as I know it does not change your firewall rules. You would need to use iptables for that directly, because this is not something that can be reasonably automated without actually knowing what the user wants. systemd is an init system with a lot of bells and whistles. One of the whistles is systemd-networkd, which is also a complete networking solution, but it also delegates some work to systemd-resolved. It also doesn't take care of firewalling. If you want to get a better understanding on how networks are set up, then you should rather look for more low-level tools like iproute2 (which provides the "ip" tool) and dhclient/dhcpd. For wireless you should look at wpa_supplicant (which is afaik used by Network Manager under the hood). And then there is of course iptables which is used to manipulate the flow of packages through the network. It should be noted that eBPF is intended to replace iptables but knowledge of iptables will still prove useful for many years to come.
- dharmab 3y agoA classic on *nix networking fundamentals: https://beej.us/guide/bgnet/ https://beej.us/guide/bgnet/ It includes a further reading list: https://beej.us/guide/bgnet/html/split/more-references.html#more-references https://beej.us/guide/bgnet/html/split/more-references.html#... These don't cover iptables and other firewalls themselves, but they give you enough knowledge that you can read the iptables manpage and other manuals and understand them.
- beeburrt 3y agohttps://www.dbooks.org/computer-networks-0128182008/ https://www.dbooks.org/computer-networks-0128182008/
- wjholden 3y agoDo you specifically want to learn networking for Linux? If not, the Network+ and/or CCNA certifications are a great place to start for generic network education.
- rfmoz 3y agoLinux Firewalls: Enhancing Security with Nftables and Beyond