The Linux network has gone through several generations of development. Now you need to use the ip utility to set up connections and all sorts of checks. Some others like ifconfig, route (although the Internet is full of instructions on how to use them) are no longer worth it. A good video on this topic (iproute2): https://www.youtube.com/watch?v=lKgqpYs14Ss&list=PLnOsFlFEJ4s2ZeK8AWX4cCNqPs43RtNXT&index=5&pp=gAQBiAQB . It is clear that this is about the core and the utilities for it. Distribution-specific configuration utilities (the same NetworkManager) – they can and should be used, but do not forget that this is just an add-on.

If it seemed too easy, then the text is about several routing tables (and why it is needed): https://timeweb.com/ru/community/articles/nastroyka-neskolkih-tablic-marshrutizacii-na-odnom-servere

Then we have traffic, but we want to do something strange (port forwarding / NAT) or set filtering rules (firewall), then we remember about iptables. A few videos to understand this topic as well:

It would seem that’s all, nothing else is needed… but, iptables is already quite outdated. There is a generalizing replacement for it with a slightly nicer syntax: nf_tables (the main utility of nft, but casino fans have ruined this abbreviation). Video how to deal with this (already knowing iptables): https://www.youtube.com/watch?v=XcILw0qFBLA&list=PLnOsFlFEJ4s2ZeK8AWX4cCNqPs43RtNXT&index=2&t=911s&pp=gAQBiAQB

And like the cherry on the cake – VPN. Take ipsec (strongwan). It adds its magic by default after the last stage of iptables. So it makes a lot of confusion if you suddenly want to adjust at least a little. Therefore, it is better to use the VTI (virtual tunnel interface) option: a virtual network interface is created and we can normally route and connect, at least a little less magic. Video:

Why such a long introduction? See the following note.