How to store the headers of all TCP and UDP packets in the database. that pass through the RockyLinux router?
You can use tcpdump to capture the packets and store them into a file but you would need something to read the file and store into a database.
I would look into using something like IPFIX or Netflow to accomplish this, as these are purpose built to extract the information you’re looking for.
Lots of open source tools can help do this on lInux
For example? Which one packet by this ?
Lots of options in this space… Ntopng, elastiflow with some ipfix exporter, goflow from cloudflare, all come to mind right now
remembered the name of a new flow collector I’d seen lately, too! https://demo.akvorado.net/
This one is pretty exciting, IMO