i'm not worried about userdat but would like to get services.c and websrvr.c to use the "Hostname: domain [IP]" format... i tried adding " [%s]" and "host_ip" as i did in the ftpsrvr.c, mailsrvr.c, and main.cpp files listed above but of course the compiler complains that host_ip is not valid...
so my question is how can i get the IP output in "Hostname: badactor.invalid [www.xxx.yyy.zzz]" format in the three log lines in services.c and websrvr.c?
so my question is how can i get the IP output in "Hostname:
badactor.invalid [www.xxx.yyy.zzz]" format in the three log lines in
services.c and websrvr.c?
The variable 'host_ip' was just not valid in those contexts.
The key is to look for where the IP address is actually used/logged
(in text form) before or after the code where you want to use it.
In websrvr.c, I saw the use of 'session.host_ip' (in a SAFECOPY
operation, so I know it's a string) - so I just used that variable
instead of 'host_ip'.
In services.c, it was a little more complicated because we used a
function (inet_addrtop) to convert the IP address from binary to text
and store the result in 'client.addr', but that was done *after* the
line you wanted to modify.
So I just moved that initialization of client.addr to *before* the
block of code you wanted to modify and then use 'client.addr' where
you were wanting to use 'host_ip'.
excellent! thanks for the update, too... this'll enable me to cut out some
a domain hosted in the cloud somewhere has been scanning my system... pretty aggressively at times... they're a known infosec
term Node 1 Telnet c87-118-38-247.dataguard.no [87.118.38.247]
a domain hosted in the cloud somewhere has been scanning my system...
pretty aggressively at times... they're a known infosec [...]
term Node 1 Telnet c87-118-38-247.dataguard.no [87.118.38.247]
You may be looking for a broader solution, but why not just block the network in question?
Are they doing this from multiple networks?
the line given above is not the "bad actor"... it is an example only... plus the "bad actor" is hosted on a cloud network that
provides VMs... i don't want to block the whole thing because i know that some other BBS operators are on the same network...
that's why i've chosen to grab the IPs and add them to my block list...
the line given above is not the "bad actor"... it is an example only...
plus the "bad actor" is hosted on a cloud network that provides VMs...
i don't want to block the whole thing because i know that some other
BBS operators are on the same network... that's why i've chosen to
grab the IPs and add them to my block list...
Ah, fair enough... most of the blocking I do tends to be "Oh, Russia? China? buh-bye..."
Were you able to get the log management sorted to your liking?
Sysop: | r00t |
---|---|
Location: | Newport Beach, CA |
Users: | 13 |
Nodes: | 6 (0 / 6) |
Uptime: | 33:46:59 |
Calls: | 145 |
Files: | 238 |
Messages: | 33,772 |