I'm looking to monitor activity regarding connection attempts to closed ports on my system, as part of a server side portknocking implemetation. However, I am confused about what log file in particular i should ask for this information. Checking my \var\log
directory.
I found a pdf manual on the internet, "Implementing a Port Knocking System in C.pdf", and the part of the example we are concerned with is as below.
// INITIALIZEmemcpy(logfile, "/var/log/messages", sizeof(logfile)-1);strcpy(password, getpass("Enter decryption password: "));BF_set_key(&bfkey, sizeof(password), password);logfileptr = NULL;hosts = NULL;
I don't happen to have this log file /var/log/messages
in my system.I've also tried ChatGpt and it says to try the /var/log/syslog
in which I did not find any relevant information.