Page 1 of 1

Get source port of connection

Posted: 2019/05/30 13:13:02
by opusProjects
Hi all,
Is there a way to log source port of new https connection?
The end goal is to log ip + source + timestamp port for each connection
e.g

xxx.xxx.xxx.xxx 49524(source port) 30/5/19 16:12

Thanks,
Alon

Re: Get source port of connection

Posted: 2019/05/30 17:01:20
by aks

Re: Get source port of connection

Posted: 2019/05/30 17:13:01
by avij
http://httpd.apache.org/docs/2.4/mod/mo ... onfig.html seems to suggest it would be possible to define a custom log format which includes the client's port as well.

Re: Get source port of connection

Posted: 2019/05/30 17:15:05
by aks
Hear, hear ^^ you can.
The source port is in the packet (at a "well known" offset).