Score:0

How can I log all IPs and hostnames a linux system is trying to connect to?

cn flag
Ben

Hello I would like to log all IPs and host names a linux system is trying to connect to on the linux system directly. Is this possible?

Score:1
za flag

You can use standard traffic monitoring tools, like flowcapture + ipt_NETFLOW, (or softflowd) to record all IPs, ports, etc. a machine accesses. Then flow-tools utilities will allow you to extract various statistics.

For DNS names it is impossible in case modern inventions like DoH are used. If it's not used, you can set up a DNS resolver and log all queries.

Score:1
jp flag

The simplest way would be to use iptables with -j LOG.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.