10 days and 10 tips for Microsoft Tunnel Gateway: Day 4

Post-Installation Health Check

The Microsoft Intune admin center shows basic tunnel server status, but when I’m SSH’d into a server troubleshooting, I need answers faster.

This health check script shows everything in seconds. I run it right after installation to verify everything works, and whenever I’m troubleshooting to see what’s broken.

GitHub Repository: https://github.com/imabdk/Microsoft-Tunnel-Gateway

What it checks:

  1. Service and container status (mst-cli health + Docker/Podman container validation)
  2. Configuration files and sync status from logs
  3. Certificate expiration (warns if under 30 days)
  4. Recent errors in logs (last 30 minutes of mstunnel-agent, mstunnel_monitor, ocserv)
  5. Server configuration (routes, DNS, ports from admin-settings.json)
  6. Listening ports

Read more…

10 days and 10 tips for Microsoft Tunnel Gateway: Day 3

Automate Your Prerequisites

If you’re deploying multiple tunnel servers or rebuilding environments, save yourself the hassle and automate it. I’ve created shell scripts to handle all the prerequisites and configuration steps.

Available Scripts

GitHub Repository: https://github.com/imabdk/Microsoft-Tunnel-Gateway

  • setup-prerequisites-ubuntu.sh – System prerequisites and package installation (Docker, kernel modules, jq)
  • setup-auditing-ubuntu.sh – Configure audit logging for security compliance
  • setup-firewall-ubuntu.sh – Firewall configuration and rules setup

Read more…

10 days and 10 tips for Microsoft Tunnel Gateway: Day 2

Expand Your Readiness Checks

The official readiness script is a good start, but it has a blind spot in regards to checking for outbound connectivity: redirect chains. When an endpoint redirects to another domain that’s blocked, the script just throws “Error: not expected” without telling you what’s actually being blocked.

That’s why I built a custom diagnostic tool – to trace those redirect chains and tell you exactly which domain is causing the problem.

Read more…