Source-port logging
termRecording the remote source port and an accurate timestamp alongside the remote address, so that a report about an event remains attributable when the address is shared by many subscribers.
Without the port, an abuse report against a carrier-grade NAT address is unanswerable: the provider can only say that some hundreds of customers were behind that address at that moment. Most internet-facing services still log the address alone, which is why so many reports go nowhere and why blocking by address punishes a whole shared pool. It costs one extra field, and it is the single cheapest thing a service operator can do to make the abuse ecosystem work.
RFC 6302 (June 2011) asks internet-facing servers to record, with each connection, the source port, a timestamp in UTC accurate to the second from a traceable source such as NTP, and the transport and destination port where a service uses several. The same applies to load balancers logging on behalf of servers, and to IPv6 for consistency.
Precision matters because ports are reused. RFC 6888 only asks a CGN to wait 120 seconds before reallocating a port, some reuse ports almost at once, and RFC 6269 warns that even small clock skew between a server and a densely used CGN makes the subscriber ambiguous. The alternative, logging destinations at the CGN, is weaker: it cannot separate subscribers who reach a popular server at nearly the same time, and RFC 6888 says a CGN should not log destinations at all.
Common servers can do it: Apache with %a and %{remote}p in the log format, Postfix with smtpd_client_port_logging, off by default, and OpenSSH with LogLevel VERBOSE. RFC 7768 recorded that IIS, Cyrus IMAP and UW IMAP could not. In Brazil, the Marco Civil's definition of a connection record names date, time, duration and IP address, not the port.
Also known as: rfc 6302, abuse logging, ip plus port plus timestamp
Sources
- RFC 6302, Logging Recommendations for Internet-Facing Servers, June 2011: sections 1 to 4 (read 2026-10-19)
- RFC 6269, Issues with IP Address Sharing, June 2011: section 12 (read 2026-10-19)
- RFC 7768, Port Management to Reduce Logging in Large-Scale NATs, January 2016: section 3 and appendix A (read 2026-10-19)
- Lei nº 12.965, de 23 de abril de 2014 (Marco Civil da Internet), planalto.gov.br: artigos 5º e 13 (read 2026-10-19)