Skip to content

Commit d8dfb4b

Browse files
authored
Merge pull request #7297 from Brenduns/14015489-tunnel-logging-update
13677455 (14015489) 2203 OOB - Tunnel log update
2 parents 9141259 + 0bcd157 commit d8dfb4b

1 file changed

Lines changed: 22 additions & 5 deletions

File tree

memdocs/intune/protect/microsoft-tunnel-monitor.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ keywords:
55
author: brenduns
66
ms.author: brenduns
77
manager: dougeby
8-
ms.date: 08/23/2021
8+
ms.date: 04/11/2022
99
ms.topic: how-to
1010
ms.service: microsoft-intune
1111
ms.subservice: protect
@@ -141,15 +141,32 @@ For more information and command-line examples, see [mst-cli command-line tool f
141141

142142
## View Microsoft Tunnel logs
143143

144-
Microsoft Tunnel logs information to the Linux server logs in the *syslog* format. To view log entries, use the **journalctl -t** command followed by one or more tags that are specific to Microsoft Tunnel entries:
144+
Microsoft Tunnel logs information to the Linux server logs in the *syslog* format. To view log entries, use the **journalctl -t** command followed by one or more tags that are specific to Microsoft Tunnel entries
145145

146-
- **ocserv** - Display server logs.
147146
- **mstunnel-agent**: Display agent logs.
148147
- **mstunnel_monitor**: Display monitoring task logs.
148+
- **ocserv** - Display server logs.
149+
- **ocserv-access** - Display access logs.
150+
151+
By default, access logging is disabled. Enabling access logs can reduce performance, depending on the number of active connections and usage patterns on the server. Logging for DNS connections increases the verbosity of the logs, which can become noisy.
152+
153+
Access logs have the following format: `<Server timestamp><Server Name><ProcessID on Server><userId><deviceId><protocol><src IP and port><dst IP and port><bytes sent><bytes received><connection time in seconds>` For example:
154+
155+
- *Feb 25 16:37:56 MSTunnelTest-VM ocserv-access[9528]: ACCESS_LOG,41150dc4-238x-4dwv-9q89-55e987f30c32,f5132455-ef2dd-225a-a693-afbbqed482dce,tcp,169.254.54.149:49462,10.88.0.5:80,112,60,10*
156+
157+
To enable access logging:
158+
159+
1. set TRACE_SESSIONS=1 in /etc/mstunnel/env.sh
160+
2. set TRACE_SESSIONS=2 to include logging for DNS connections
161+
3. Run `mst-cli server restart` to restart the server.
162+
163+
If access logs are too noisy, you can turn off DNS connection logging by setting TRACE_SESSIONS=1 and restarting the server.
149164

150-
For example, to view information for only the tunnel server, run `journalctl -t ocserv`. To view information for all three, you can run `journalctl -t ocserv -t mstunnel-agent -t mstunnel_monitor`.
165+
Command line examples for *journalctl*:
151166

152-
You can add `-f` to the command to display an active and continuing view of the log file. For example, to actively monitor ongoing processes for Microsoft Tunnel, run `journalctl -t mstunnel_monitor -f`.
167+
- To view information for only the tunnel server, run `journalctl -t ocserv`.
168+
- To view information for all log options, you can run `journalctl -t ocserv -t ocserv-access -t mstunnel-agent -t mstunnel_monitor`.
169+
- Add `-f` to the command to display an active and continuing view of the log file. For example, to actively monitor ongoing processes for Microsoft Tunnel, run `journalctl -t mstunnel_monitor -f`.
153170

154171
More options for *journalctl*:
155172

0 commit comments

Comments
 (0)