Get source port of connection

Issues related to configuring your network
Post Reply
opusProjects
Posts: 1
Joined: 2019/05/30 13:08:48

Get source port of connection

Post by opusProjects » 2019/05/30 13:13:02

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


User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Get source port of connection

Post by avij » 2019/05/30 17:13:01

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.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Get source port of connection

Post by aks » 2019/05/30 17:15:05

Hear, hear ^^ you can.
The source port is in the packet (at a "well known" offset).

Post Reply