NFWare glossary CGNAT & networking

What Is Syslog? Protocol, Servers, and Message Format Explained

Event messages and NAT logging

Published Dec 1, 2026← Browse all terms

Syslog is a framework for conveying event messages from devices and applications to logging systems. It defines a message format and works with transport mappings that carry messages to receivers. A central collector can receive logs from routers, NAT devices, servers and applications, while other software stores, searches or analyzes them.

What Is Syslog?

The term “syslog” can refer to several related things:

  • The message format: fields identifying the source, priority and event content.
  • The transport mechanism: how messages move between originators, relays and collectors.
  • The software: services that generate, receive or forward logs, such as syslog daemons.

These are separate choices. A device can produce a modern message format while using an unencrypted transport. A collector may receive the message successfully without indexing it in the fields an investigation needs.

Syslog supports centralized operational logging, including authentication events, configuration changes and failures. It can also carry application-specific records such as NAT mapping events. The receiving system needs to understand that content; collecting text alone does not provide complete analysis.

The Syslog Protocol and Transports

RFC 5424 specifies the modern syslog message format and architecture. The older BSD behavior is documented in RFC 3164. Transport mappings are specified separately.

TransportCommon destination portOperational properties
UDP514No transport acknowledgment or retransmission; messages can be lost, reordered or duplicated
Plain TCPImplementation-specific; 514 is a common conventionOrdered byte stream and retransmission, but no encryption; sender and receiver must agree on message framing
TLS over TCP6514Protects a configured transport connection with TLS; certificate validation and endpoint configuration matter

RFC 5426 describes UDP transport. RFC 6587 documents legacy TCP framing, while RFC 5425 specifies TLS transport with default port 6514. A TCP receiver must know where one message ends and the next begins, for example through octet-counting framing.

TCP and TLS do not guarantee durable storage by the final collector. A receiver can acknowledge network data before its application writes the record, and queues can overflow during failures. Relays also create separate transport connections. Assess buffering, retry behavior, storage and monitoring across the whole pipeline.

Syslog Severity Levels and Facilities

The priority value, PRI, combines facility and severity:

PRI = facility × 8 + severity

Severity values run from 0 to 7, with lower numbers conventionally indicating more urgent conditions.

CodeSeverityConventional meaning
0EmergencySystem unusable
1AlertImmediate action required
2CriticalCritical condition
3ErrorError condition
4WarningWarning condition
5NoticeNormal but significant event
6InformationalInformational event
7DebugDebug-level detail

Facilities are numeric categories, with values from 0 to 23. Familiar names include kernel, user, daemon and local0 through local7. They support classification and routing of records; they do not cryptographically establish who generated a message.

Filtering needs to fit the record's purpose. A routine NAT allocation can be informational while still being essential to a later translation lookup. Keeping only warnings and errors may discard the very mapping events an operator needs.

Syslog Message Format and Example

An RFC 5424 message contains header fields and structured data, followed by optional message content:

<PRI>VERSION TIMESTAMP HOSTNAME APP-NAME PROCID MSGID STRUCTURED-DATA [MSG]

Consider this fictional example:

<134>1 2026-12-01T10:00:00Z edge.example.net network 42 LINK_UP - interface=wan1

The PRI value 134 represents facility local0, numbered 16, and severity Informational, numbered 6. Version is 1. The timestamp is UTC, the host is edge.example.net, the application name is network, the process identifier is 42, and the message ID is LINK_UP. The hyphen denotes absent structured data; interface=wan1 is the message body.

An RFC 5424 timestamp can include a timezone and fractional seconds, but a sender may use a NILVALUE when information is unavailable. The presence of a timestamp field therefore does not prove that the event time is known or that clocks are synchronized.

There is no universal 1,024-byte limit for modern syslog. Supported message length depends on transport and implementation. Oversized messages may be truncated or discarded, so validate the limits at devices, relays, parsers and storage systems.

What Is a Syslog Server?

A syslog server is a receiver for event messages. Depending on the implementation, it may filter, forward, write files or send events to another platform. Search, alerting and retention are capabilities of the deployed logging system, rather than automatic features of the wire format.

A typical pipeline is:

Devices and applications → optional relay → collector → storage or SIEM

A relay can aggregate messages and bridge supported transports. If a device sends unencrypted messages to a relay that then uses TLS, only the onward connection receives that TLS protection. Secure deployment must consider both segments.

Collectors must handle source identity, format variants, timestamp interpretation and application-specific parsing. Monitor queue depth, rejected messages and storage failures as well as whether the listening port is reachable.

Where and How Syslog Is Used in NAT and CGNAT

NAT changes addressing information, and NAPT also translates ports. When CGNAT shares a public IPv4 address among subscribers, an external connection report can identify only the public endpoint. A translator's event log can supply the corresponding internal mapping.

Syslog transports those events as messages. The NAT application defines what the body means: mapping creation or deletion, session activity or port-block assignment. A generic collector may accept the record without understanding its NAT fields, so a suitable parser and searchable schema are necessary.

Correlating a public endpoint with an internal mapping

An investigation normally needs the public address, public port, transport protocol and event time. The operator looks for the mapping or allocation that covered that interval, then correlates its internal address and routing context with subscriber-assignment records.

Ports can be reused after a mapping ends. Private addresses can also overlap between VRFs. An address alone, a collector receipt timestamp alone or a record without the relevant context can produce an ambiguous result. Preserve event time, source identity and lifecycle information wherever the export format supplies them.

NAT records establish mapping information rather than a person's identity or public-address ownership. Subscriber attribution requires additional evidence, and missing events or clock errors can limit the conclusion.

NAT logs in NFWare vCGNAT

The NFWare NAT logging guide describes four choices:

Log typeRecorded detail
address-mapAddress mapping creation/deletion; no ports or destinations
port-mapAddress and port mapping creation/deletion; no destinations
sessionSession start/end with internal, public and destination endpoints
port-blockPBA block allocation/release; no destinations

NAT messages use APP-NAME NAT; their event fields are in MSG, not RFC 5424 structured data. Timestamps and hostname are omitted by default and have separate enablement options.

Example configuration:

nat log type session enable
nat log server 0 type syslog ip 192.0.2.50 port 514
nat log server 0 type syslog timestamp enable
nat log server 0 type syslog hostname cgnat-a
nat log enable
show nat log counters

Use a reachable collector and an unused server ID. 192.0.2.50 is a documentation address. This illustration has not been applied to a working device.

An illustrative session MSG body in the documented format is:

A VRF 7 6 INT 10.24.8.15:51514 EXT 203.0.113.10:40001 DST 198.51.100.20:443 DIR OUT

Here A denotes creation and 6 denotes TCP. The guide provides per-log facility/severity settings. Configure the parser accordingly and verify collector storage. The shown CLI does not demonstrate TLS support.

Choosing Syslog, NetFlow or IPFIX for NAT logs

Syslog offers a text message representation that can fit an existing logging pipeline. NetFlow v9 and IPFIX use template-based records. All require a receiver that understands the chosen event schema.

Choose according to exporter support, required fields, collector compatibility and event volume. A text pipeline may need custom extraction rules; a template pipeline needs correct template and stream handling. Neither format alone guarantees a complete or durable NAT archive.

Syslog in Security Monitoring

Syslog can supply events to a SIEM, which correlates them with other sources and applies detection rules. For example, repeated authentication failures across many systems can justify investigation, but they are not by themselves proof of an attack.

For NAT investigations, device events can be correlated with subscriber assignments, network changes and application records. Keep event time distinct from collector receipt time, preserve original messages where needed, and protect access to logs containing sensitive operational or subscriber information.

Using syslog does not automatically satisfy a retention, audit or regulatory requirement. The content, completeness, access controls and storage policy must fit the applicable purpose. TLS protects a supported transport connection; it does not make stored logs tamper-proof.

Benefits and Limitations of Syslog

Syslog provides a widely supported mechanism for centralizing diverse events. Facilities, severity and message fields can help route records into operational storage and analysis systems.

Important limits include:

  • Delivery gaps: UDP loss, queue overflow, restarts or collector failures can remove events.
  • Format variation: legacy headers and vendor-specific MSG bodies require appropriate parsing.
  • Timestamp quality: missing fields or clock drift can undermine correlation.
  • Size limits: relays or receivers may truncate records they cannot handle.
  • Security scope: encryption, endpoint authentication and stored-record protection need explicit configuration.
  • Volume: NAT session logging can generate a different workload from occasional system fault messages.

Test the complete pipeline under representative load. For operators, that includes reception and retention; for developers, parser behavior and missing fields. IPv4 brokers and address holders should treat logs as evidence of observed use at a time, separate from allocation or transfer rights.

Frequently Asked Questions

What port does syslog use?

UDP syslog commonly uses 514. TLS syslog uses default port 6514. Plain TCP deployments use configured ports and require compatible message framing.

What is a syslog server?

A receiver that collects event messages and may store, filter or forward them. Search and alerting depend on the software and pipeline deployed with it.

What is the difference between syslog and a SIEM?

Syslog defines message and transport mechanisms. A SIEM ingests records, correlates events and supports analysis or alerting; syslog can be one of its input methods.

Does TCP with TLS guarantee log delivery?

No. It protects the transport connection and provides TCP delivery properties, but does not confirm durable storage by the final application. Queues, restarts and storage failures still need handling.

How is syslog used in NAT?

A supported translator exports mapping, session or port-allocation events in message bodies. Collectors parse those records so operators can correlate public endpoints and event times with internal mappings and subscriber records.

What is the difference between RFC 3164 and RFC 5424?

RFC 3164 documents legacy BSD syslog behavior. RFC 5424 defines a versioned message structure with explicit fields and structured data, while allowing unavailable values where specified. A sender's configuration still determines which information is present.

Conclusion

Syslog conveys event records into a logging pipeline. For NAT and CGNAT, its practical value depends on mapping detail, timestamps, context and reliable parsing and storage. Validate those properties alongside the chosen transport, rather than assuming that a central server or a TLS connection establishes a complete history.

Talk to NFWare

Let’s talk about
your network.

Have a question about CGNAT or load balancing? Tell us what you’re working on.

[email protected]
CGNATLoad balancingNetwork virtualization
Contact our team

Read our Privacy Policy to learn how we handle your information.

If the form does not load, open the contact form.