10.5. Syslog ALG

The Syslog ALG can perform checks on Syslog messages passing through the firewall with the ability to drop messages containing certain text. The ALG is not used with Syslog messages generated by the local firewall itself.

Syslog ALG Setup

The Syslog ALG is set up using the following steps:

  1. Create a new ServiceTCPUDP object that has the following settings:

    • DestinationPorts: 514

    • Type: UDP

    • AppProto: Syslog

    Alternatively, the predefined syslog service could be used. This already has its AppProto property set to the value Syslog.

  2. Create a new SyslogAlgProfile object that defines the type of processing to be performed by cOS Stream on the targeted Syslog traffic. The key properties of this object are described below.

  3. Create a new IPRule object that allows the targeted Syslog traffic to flow. The Service property of the rule's filter must be set to the service created in the first step. The SyslogAlgProfile created in the previous step must also be assigned to the rule.

Key Properties of SyslogAlgProfile

A SyslogAlgProfile object has the following key properties:

Any Return Traffic Will Close Traffic Flows

Syslog traffic is one directional and there should be no traffic going in the return direction. If the Syslog ALG detects any returning traffic, the traffic is dropped and the flow is closed.

Example 10.7. Syslog ALG Setup

In this example, Syslog traffic flowing between interfaces if1 and if2 will be scanned using a SyslogAlgProfile.

The following is required for the Syslog messages processed:

  • Messages will be tagged with the receiving interface and the tag prefix text "Receiving_If=" will be added.

  • Syslog messages will be dropped if they contain either the keyword "test" or "debug".

  • The maximum allowed message size is to be 8192 bytes, otherwise the message is dropped.

Command-Line Interface

A. Create a new Service object for the Syslog traffic:

System:/> add Service ServiceTCPUDP my_syslog_service
			Type=UDP
			DestinationPorts=514
			AppProto=Syslog

B. Create a SyslogAlgProfile object:

System:/> add SyslogAlgProfile my_syslog_profile
			AppendTag=RecvIfName
			TagPrefix="Receiving_If="
			DenyProhibitedKeywords=Yes
			ProhibitedKeywords=test,debug
			MaxSyslogLength=8192

C. Create an IPRule for Syslog traffic:

System:/> cc RuleSet IPRuleSet main
System:/IPRuleSet/main> add IPRule Action=Allow
			Service=my_syslog_service
			SourceInterface=if1
			SourceNetwork=if1_net
			DestinationInterface=if2
			DestinationNetwork=if2_net
			SyslogAlgProfile=my_syslog_profile
			Name=my_syslog_rule