How to Block NTLM Connections on Windows
In this article
To block NTLM connections on Windows, you need to disable the NTLM authentication protocol through Group Policy or the registry. The most effective method is to set the security policy "Network security: Restrict NTLM: Incoming NTLM traffic" to "Deny all" and "Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers" to "Deny all." This prevents your PC from accepting or initiating NTLM authentication, forcing Kerberos or other modern protocols. Before you begin, ensure you have administrative rights and understand that blocking NTLM can break legacy applications and access to older network devices. Also, verify that your environment supports Kerberos (typically in an Active Directory domain) or that you have alternative authentication methods in place.
What You'll Need
- Administrative privileges on the Windows PC.
- Access to the Local Group Policy Editor (gpedit.msc) or Registry Editor (regedit).
- Knowledge of your network environment: blocking NTLM may disrupt access to file shares, printers, or applications that rely on NTLM.
- A backup of your system or registry before making changes.
Step-by-Step
- Open Local Group Policy Editor. Press Win+R, type
gpedit.msc, and press Enter. If you're on Windows Home, gpedit.msc is not available by default; you can use the registry method described later or enable it via optional features, but that is not officially supported. Note that menu labels can differ slightly by Windows version and edition. - Navigate to the NTLM restriction policies. In the left pane, go to Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options. In the right pane, scroll down to find the policies starting with "Network security: Restrict NTLM".
- Configure incoming NTLM traffic. Double-click "Network security: Restrict NTLM: Incoming NTLM traffic". Select "Deny all" and click OK. This blocks all incoming NTLM authentication requests to your PC.
- Configure outgoing NTLM traffic. Double-click "Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers". Select "Deny all" and click OK. This prevents your PC from using NTLM when connecting to other servers.
- Configure NTLM authentication for domain accounts (optional). If you are in a domain, you may also want to set "Network security: Restrict NTLM: NTLM authentication in this domain" to "Deny all". This policy is only available on domain controllers, not on local machines. Skip this step if you are not a domain admin.
- Apply the changes. Close the Local Group Policy Editor. Open Command Prompt as administrator and run
gpupdate /forceto apply the policy immediately. Alternatively, restart your computer. - Verify the settings. Open Event Viewer (eventvwr.msc) and check the Security log for events indicating NTLM blocking, such as Event ID 8003 (NTLM client blocked) or 8004 (NTLM server blocked). You can also use the "Network security: Restrict NTLM: Audit NTLM authentication in this domain" policy to log NTLM usage without blocking, which helps identify dependencies before enforcing.
Common Mistakes
- Blocking NTLM without testing. Many legacy applications, network printers, and NAS devices use NTLM. Always audit first using the audit policies to see what would break.
- Forgetting to block both incoming and outgoing. Blocking only one direction leaves a gap. For full protection, deny both.
- Applying policies to the wrong scope. Group Policy settings apply to the local computer or domain. If you're in a domain, local policy may be overridden by domain policy. Check with
gpresult /r. - Ignoring the impact on domain controllers. Blocking NTLM on a domain controller can prevent domain logins if Kerberos is not properly configured. Test in a lab first.
- Not rebooting or forcing policy update. Changes may not take effect until you run
gpupdate /forceor restart.
Tips
- Use the audit mode first: set the policies to "Audit" instead of "Deny all" to log NTLM usage without blocking. Review the Security log for Event IDs 8001, 8002, 8003, 8004 to identify which applications or servers rely on NTLM.
- If you are not in a domain, consider using the registry method: navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0and setRestrictReceivingNTLMTrafficto 2 (deny all) andRestrictSendingNTLMTrafficto 2. Create the DWORD values if they don't exist. - For domain environments, use Group Policy Management Console (GPMC) to apply these settings centrally.
- Document any exceptions: some applications may require NTLM; you can create fine-grained exceptions using the "Define NTLM traffic exceptions" policy.
- Keep in mind that blocking NTLM may affect remote desktop connections, especially to older servers. Test thoroughly.
Troubleshooting
If you encounter issues after blocking NTLM, follow these steps:
- Check Event Viewer. Look for errors related to authentication failures, such as Event ID 4625 (logon failure) or specific NTLM block events. This will help identify which service or application is failing.
- Review policy application. Run
gpresult /h report.htmlto see which policies are applied and if there are conflicts. Ensure the NTLM restriction policies are winning. - Temporarily revert changes. If critical services break, set the policies back to "Not Defined" or "Allow all" and run
gpupdate /force. Then re-audit to find the root cause. - Check for legacy protocols. Some applications may still use NTLMv1; ensure they are updated or configured to use Kerberos or NTLMv2. Blocking NTLM entirely will also block NTLMv2, so consider if you need to allow NTLMv2 for specific servers.
- Consult application logs. Many applications log authentication errors; check their logs for NTLM-related failures.
Frequently Asked Questions
Does blocking NTLM affect my ability to log in to Windows?
If you are using a local account or a domain account with Kerberos, logon should not be affected. However, if your domain controller only supports NTLM, you may be unable to log in. Always test in a controlled environment.
Can I block NTLM on Windows Home edition?
Windows Home does not include the Local Group Policy Editor by default. You can use the Registry Editor to set the same restrictions, but be cautious and back up the registry first.
Will blocking NTLM break file sharing?
It can if the file server only supports NTLM. Modern Windows systems use Kerberos in domain environments, but workgroup shares may rely on NTLM. Audit first to identify dependencies.
How do I know if NTLM is being used on my network?
Enable auditing via Group Policy: set "Network security: Restrict NTLM: Audit NTLM authentication in this domain" to "Enable auditing for all accounts" and review the Security log for NTLM events.
Is it safe to block NTLM on a standalone PC?
Yes, but you may lose access to network resources that require NTLM, such as older printers or NAS devices. Test before enforcing.
What is the difference between NTLMv1 and NTLMv2?
NTLMv2 is more secure than NTLMv1. Blocking NTLM entirely blocks both versions. If you need to allow NTLMv2 for compatibility, you can use the policy "Network security: LAN Manager authentication level" to require NTLMv2 and refuse LM and NTLM.