Created
May 6, 2026 05:39
-
-
Save craigbalding/631721c29f714c66bb036cd5c85fa39d to your computer and use it in GitHub Desktop.
Tailscale RDP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # powershell -ExecutionPolicy Bypass -File .\rdp-tailscale-only.ps1 | |
| # Disable the built-in broad RDP rules | |
| Disable-NetFirewallRule -DisplayGroup "Remote Desktop" | |
| # Allow RDP only from Tailscale IPv4 | |
| New-NetFirewallRule ` | |
| -DisplayName "RDP over Tailscale IPv4 only" ` | |
| -Direction Inbound ` | |
| -Action Allow ` | |
| -Protocol TCP ` | |
| -LocalPort 3389 ` | |
| -RemoteAddress 100.64.0.0/10 | |
| # Optional: allow Tailscale IPv6 too | |
| New-NetFirewallRule ` | |
| -DisplayName "RDP over Tailscale IPv6 only" ` | |
| -Direction Inbound ` | |
| -Action Allow ` | |
| -Protocol TCP ` | |
| -LocalPort 3389 ` | |
| -RemoteAddress fd7a:115c:a1e0::/48 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment