VII. Router Diagnostics
ExpiredSyslog Messages - Interpreting Firewall and CSM logs
Syslog is a method of logging router activity. When enabled, the router continuously outputs Syslog event messages; these can be captured by a Syslog daemon (a listening/capturing program) and displayed or logged to a file. The initial configuration of Syslog on DrayTek Vigor routers is explained in this article.
This guide will demonstrate how to interpret Syslog messages for the Firewall (IP Filter Rules), and CSM (Content Security Management) facilities of DrayTek Vigor routers that use DrayOS, in these sections:
-
DrayTek Syslog Introduction
-
Interpreting Firewall IP Filter Syslogs
-
Interpreting CSM Syslog Information
DrayTek Syslog Introduction
In the DrayTek Syslog utility, the [Firewall] tab contains Syslog messages relating to the Fiirewall, which includes both IP Filter Rules and CSM. These Syslog messages can be used to troubleshoot the Firewall and log traffic passing through the router. Each message contains information on whether a session has been be passed or blocked by the router and which Firewall Filter Rule, CSM rule or Keyword Object has been matched to perform that action.
In the example below for instance, we can see that the [FILTER], which is the router's IP Filter, has blocked ICMP (Ping) packets from the local IP address "192.168.100.10" to the remote IP address "8.8.4.4":
The DrayTek Syslog utility displays each Syslog message with four columns:
If using a Syslog daemon other than the DrayTek Syslog Utility, the messages are separated with different Facility / Category codes. The Firewall messages from DrayTek Vigor routers use Facility "local0".
Interpreting Firewall IP Filter Syslogs
The router's Firewall related messages are located in the [Firewall] > [IP Filter Log] of the DrayTek Syslog utility.
When Firewall Filter Rules are configured, there is a "Syslog" tickbox by the side of each Filter Rule Action; If this is ticked, the router will send a syslog message when a session matches that rule and the Firewall performs the configured Action of that Filter Rule.
These Syslog messages can simplify the process of troubleshooting the Firewall configuration; For instance when a service is blocked unexpectedly, if the Firewall has blocked that service, the router will send a Syslog message with details of the session that has been blocked and the Filter Rule that caused it to be blocked.
An Example of Syslog messages for the Firewall's IP Filter, along with details of what each segment of the message indicates, is shown below.
In this example, the router's Firewall has blocked a local IP address "192.168.1.10" from creating a UDP session on port 53 (DNS) to the remote IP of "8.8.4.4":
[FILTER][Block][LAN/RT/VPN->WAN, 0:53:53 ][@S:R=6:1, 192.168.1.10:60475->8.8.4.4:53][UDP][HLen=20, TLen=56] |
This can be broken down into these segments:
Breaking this down into each segment with details of what each indicator signifies:
Protocol & Packet Information
Interpreting CSM Syslog Information
The Syslog messages sent for Content Security Management are each tagged with the type of CSM that has been applied to each session.
The Syslog messages for Content Security Management can be found in the [Firewall] > [CSM Log] section of the DrayTek Syslog utility.
Examples of the Syslog message structure for each type of CSM and detailed explanations of their meaning can be found in the sections below:
- [CSM_UF] - URL Content Filtering
- [CSM_WF] - Web Content Filtering
- [CSM_DNSF] - DNS Filtering
- [CSM_AE] - App Enforcement
Compared to the IP Filter Syslog messages, the structure of the message is similar but no Direction is specified - this is because Content Security Management (CSM) applies only to outgoing traffic from local clients accessing the Internet. Therefore it can be assumed that all CSM entries have a direction of "LAN/RT/VPN -> WAN".
In this example, we can see that the router's DNS Filter applying the keyword filtering of the URL Content Filter has blocked access to Facebook.
URL Content Filtering - [CSM_UF]
Each URL Content Filter profile that is applied by the Firewall can be configured to send Syslog messages when blocking sessions, passing sessions, or both.
This is an example of the URL Content Filter's Syslog output; it can be broken down into sections, which are explained in the table below:
Web Content Filtering - [CSM_WF]
Each Web Content Filter profile that is applied by the Firewall can be configured to send Syslog messages when blocking sessions, passing sessions, or both.
This is an example of the Web Content Filter's Syslog output; it can be broken down into sections, which are explained in the table below:
DNS Filtering - [CSM_DNSF]
DrayTek's Content Security Management can be applied easily to encrypted or otherwise unidentifiable traffic passing through the router. It does this by performing Web Content Filtering and/or URL Content Filtering at the DNS (Domain Name Server lookup) level; when clients on the network look up the hostname for a website to determine which IP Address to access it on, the router can block this lookup and redirect the client to the router's CSM block page.
The DNS Filter links in to the Web Content Filter and URL Content Filter, therefore the Syslog message output is the same as the URL Content Filter and Web Content Filter. There are three differences in the Syslog message content from the URL Content Filter and Web Content Filter:
- Tagged with a Category of [CSM_DNSF]
- Protocol is [DNS] because the DNS Filter affects DNS traffic only
- Destination records the Hostname only instead of the full URL, due to the encrypted nature of HTTPS, determining a full URL is not possible
The examples below show the output of the DNS Filter Syslog messages. For the definitions and syntax of the categories of these examples, refer to the URL Content Filtering - [CSM_UF] and Web Content Filtering - [CSM_WF] sections above with their respective tables.
Example 1 - URL Content Filtering applied by the DNS Filter
It's possible to determine that this DNS Filter Syslog message relates to the URL Content Filter because it shows "[Type=KW..." which indicates that the DNS Filter has blocked the session because of a Keyword match, which is an element of the URL Content Filter:
Example 2 - Web Content Filtering applied by the DNS Filter
It's possible to determine that this DNS Filter Syslog message is linked to the Web Content Filter because it shows "[Category=News]"; Category based filtering is a feature of the DrayTek Web Content Filter:
App Enforcement - [CSM_AE]
DrayTek's App Enforcement can block Protocols and is able to prevent Applications / Programs accessing the Internet through the router by detecting their packet signatures and blocking their respective sessions. When App Enforcement blocks an Application or Protocol, it will send a Syslog message to indicate that it has done so.
This is an example of App Enforcement's Syslog output; it can be broken down into sections, which are explained in the table below:
Example | Syntax | Description |
---|---|---|
[CSM_AE] | [<Category>] | Category indicates that the router's URL Content Filter element of Content Security Management has sent this Syslog message |
[Block] | [<CSM Action>] |
Action performed on this session |
[LogMeIn Pro2] |
[<Application Name>] |
Application Detected |
[@S:R=6:1, | [@S:R=a:b, |
Matching Filter Rule Note - Filter Set 13 "[@S:R=13:1" indicates that the Actions set in [Firewall] > [General Setup] > [Default Rule] have been applied to this session |
192.168.1.10 : 443 |
<Local IP>:<Local Port> | Local IP Address and Local Port In this example, the Source IP is "192.168.1.10" with a port number of "443" |
-> 95.172.70.144:4467] | <Remote IP>:<Remote Port>] | Remote IP Address / Hostname and Remote Port In this example, the remote IP address was "95.172.70.144" using port "4467" |
[TCP] | [<Protocol>] | Protocol The Protocol of the session that has been blocked by App Enforcement |
[HLen=20 ...] | [<Packet Information>] |
Packet Information |
How do you rate this article?
- First Published: 08/06/2017
- Last Updated: 10/02/2022