Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Group Policies / How to Disable NetBIOS, LLMNR, mDNS Protocols in Windows

March 20, 2025 Group PoliciesWindows 11Windows Server 2022

How to Disable NetBIOS, LLMNR, mDNS Protocols in Windows

Broadcast protocols NetBIOS over TCP/IP, LLMNR, and mDNS (Multicast DNS) are used to resolve names in Windows networks where there is no (unavailable) DNS server (typically, these are home or SOHO networks). These protocols are usually not needed in corporate networks with DNS servers. In addition, these broadcast protocols are not secure and can easily be used by attackers to implement spoofing, relay, and MITM attacks, which can intercept user credentials on the local subnet (including NTLM hashes). Let’s look at how to disable the LLMNR, NetBIOS, and mDNS protocols on a Windows network, either manually or via GPO.

Contents:
  • Non-DNS Resolution Protocols in Windows: LLMNR, NetBIOS, mDNS
  • Disable LLMNR Protocol on Windows via GPO
  • Disabling NetBIOS over TCP/IP on Windows
  • How to Disable NetBIOS Over TCP/IP via GPO
  • Disable Multicast DNS (mDNS) in Windows

Non-DNS Resolution Protocols in Windows: LLMNR, NetBIOS, mDNS

DNS is the preferred name resolution protocol on Windows networks. If there are no DNS servers available on the network, alternative resolution protocols are used in the following order:

  • MulticastDNS (mDNS)
  • Link-Local Multicast Name Resolution (LLMNR)
  • NetBIOS (NBNS)

LLMNR (UDP/5355, Link-Local Multicast Name Resolution) protocol is used in all Windows versions starting from Vista, allows IPv6 and IPv4 clients to resolve the names of neighboring computers without using the DNS server due to broadcast requests in the local L2 network segment. This protocol is automatically used if DNS is unavailable (in Windows workgroups this protocol is used for Network Discovery).

NetBIOS over TCP/IP or NBT-NS (UDP/137,138, TCP/139) is a broadcast protocol that predates LLMNR and is used to publish and discover resources on the local network. NetBIOS over TCP/IP is enabled by default on all Windows interfaces.

On Windows, you can view NetBIOS statistics and current TCP/IP connections through NBT using the nbtstat command. To get the computer name by its IP address:

nbtstat -A 192.168.131.190

nbtstat discover computers in LAN using netbios

The nbtstat tool found a computer on the local network using NetBIOS and returned the name of that computer. You can list all of the entries about the neighboring computers on the same local network from the NetBIOS cache:

nbtstat -c

In the latest versions of Windows 11, NetBIOS is only used when there is no response from mDNS or LLMNR.

The Multicast DNS (mDNS) network protocol is available starting with Windows 10 version 1703 and Windows Server 2019. It enables the resolution of host names to IP addresses on small local networks without using a central DNS server. Name uniqueness within the LAN is ensured by the addition of the .local suffix. mDNS was supposed to completely replace the legacy NetBIOS and LLMNR protocols. Multicast UDP packets on port 5353 are used for name resolution. In addition, mDNS is widely used to automatically discover network printers, screens, and other services on a LAN.

When DNS is unavailable, the NetBIOS, LLMNR, and mDNS protocols allow workgroup computers to find devices on the LAN by name. These protocols can be disabled in a corporate domain environment.

Tip. Before disabling the NetBIOS, LLMNR, and mDNS protocols on all computers, test these settings on several devices. And while disabling LLMNR is usually fine, disabling NetBIOS can break the operation of legacy devices.

Disable LLMNR Protocol on Windows via GPO

In the Active Directory environment, Group Policy can be used to disable LLMNR broadcasts on domain computers and servers.

  1. Open the gpmc.msc, create a new GPO or edit an existing one that is applied to all workstations and servers
  2. Go to Computer Configuration -> Administrative Templates -> Network -> DNS Client;
  3. Enable the Turn off multicast name resolution and Turn off smart multi-homed name resolution policies GPO: disable llmnr Turn off multicast name resolution
  4. Wait for the GPO settings to be updated on the clients, or manually update them using the command: gpupdate /force

Or, disable the LLMNR protocol in Windows by creating these registry options using PowerShell:

New-Item "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT" -Name DNSClient -Force
New-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" -Name EnableMultiCast -Value 0 -PropertyType DWORD -Force
New-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" -Name DisableSmartNameResolution -Value 1 -PropertyType DWORD -Force

Disabling NetBIOS over TCP/IP on Windows

Note. Legacy Windows (2000, XP, etc.) and some non-Windows devices can use the NetBIOS protocol, so it should be tested in each specific environment before disabling it.

You can manually disable the NetBIOS protocol in the network adapter settings:

  1. Open network connection properties in the ncpa.cpl applet
  2. Select TCP/IPv4 and open its properties
  3. Click Advanced, then go to the WINS tab and select Disable NetBIOS over TCP
  4. Save the changes.

Disable NetBIOS over TCP on connection properties

If you have multiple NICs (or VLAN interfaces), be sure to disable NetBIOS in the properties of each of them.

Check the NetBIOS over TCP/IP status for network adapters from the Windows command prompt:

ipconfig /all |find "NetBIOS"

NetBIOS over Tcpip . . . . . : Disabled

You can disable NetBIOS for the specific network adapter through the registry as well. Each network adapter has a separate registry key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\Interfaces containing its TCPIP_GUID.

To disable NetBIOS for a specific network adapter, go to its registry key and change the value of the NetbiosOptions parameter to 2 (it is 0 by default).

NetbiosOptions - disabling netbios via registry

For domain clients that obtain their IP addresses from a Windows Server DHCP, you can use a separate DHCP option to disable NetBIOS.

  1. Run the dhcpmgmt.msc console, connect to the DHCP server, and select Scope Option (or Server Options);
  2. Go to the Advanced tab and select Microsoft Windows 2000 Options in the Vendor class dropdown list;
  3. Enable the 001 Microsoft Disable Netbios Option and change its value to 0x2.

001 Microsoft Disable Netbios Option - dhcp

How to Disable NetBIOS Over TCP/IP via GPO

There is no separate GPO option to disable NetBIOS over TCP/IP for all network adapters in the Group Policy Editor or in the latest version of ADMX GPO administrative templates for Windows. To completely disable NetBIOS for all network adapters, use the following PowerShell logon script:

$regkey = "HKLM:SYSTEM\CurrentControlSet\services\NetBT\Parameters\Interfaces"
Get-ChildItem $regkey |foreach { Set-ItemProperty -Path "$regkey\$($_.pschildname)" -Name NetbiosOptions -Value 2 -Verbose}

Or use a PowerShell oneliner with a WMI query:

Get-WmiObject -Class Win32_NetworkAdapterConfiguration | % {$_.SetTcpipNetbios(2)}

Save this code to disableNetbios.ps1 file, copy it to your GPO directory and run on clients via Computer Configuration -> Policies -> Windows Settings -> Scripts -> Startup- > PowerShell Scripts.

If the PowerShell execution policy settings on the clients prevent this script from running, sign the PS1 script or run it in bypass mode.

disable netbios using powershell script on gpo

Note. For changes to take effect, disable/enable network adapters, or restart a computer.

Next, open a command prompt and verify that NetBIOS is disabled for network adapters (except for tunneling interfaces):

wmic nicconfig get caption,index,TcpipNetbiosOptions

Disable Multicast DNS (mDNS) in Windows

To disable the mDNS protocol on a Windows device, create the EnableMDNS parameter with value 0 under the HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters registry key.

The command can be used to set this registry option :

REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters" /v " EnableMDNS" /t REG_DWORD /d "0" /f

Or, deploy the registry parameter via Group Policy Preferences (Computer Configuration > Preferences > Windows Settings > Registry)

  • Action: Update
  • Hive: HKEY_LOCAL_MACHINE
  • Key Path: SYSTEM\CurrentControlSet\Services\Dnscache\Parameters
  • Value name: EnableMDNS
  • Value type: DWORD
  • Value data: 0

Disable mDNS on Windows via GPO

You can also use a GPO to deploy a Windows Defender firewall rule that blocks inbound mDNS traffic on domain computers. Or, disable the mDNS (UDP-In) rule for the domain profile only. This allows users’ laptops to discover nearby devices on the network via mDNS when working outside the domain (office).

Windwos Firewall rule: block mDNS UDP In

If mDNS is disabled, users may experience problems connecting to wireless displays or projectors (wireless screen sharing or mirroring via Miracast) and some network printers.

Run the following commands to verify that the NetBIOS, LLMNR, and mDNS protocols are disabled on a computer:

netstat -nao  | FIND /i ":137 "
netstat -nao  | FIND /i ":5353 "
netstat -nao  | FIND /i ":5355 "

netstat: check mDNS llmnr and netbios are disabled

If these name resolution protocols are disabled, the commands should not return any open ports.

For additional corporate network security, it is recommended to properly configure or completely disable the WPAD proxy discovery protocol on Windows computers.
15 comments
9
Facebook Twitter Google + Pinterest
previous post
Auto Lock Computer Screen After Inactivity with GPO
next post
Read and Write Excel (XLSX) Files with PowerShell

Related Reading

Configure NTP Time Source for Active Directory Domain

May 6, 2025

How to Cancel Windows Update Pending Restart Loop

May 6, 2025

View Windows Update History with PowerShell (CMD)

April 30, 2025

Cannot Install Network Adapter Drivers on Windows Server

April 29, 2025

Change BIOS from Legacy to UEFI without Reinstalling...

April 21, 2025

15 comments

Saying Goodbye to NetBIOS - 10-D Security April 13, 2018 - 6:49 pm

[…] Disabling NetBIOS: https://support.microsoft.com/en-nz/help/313314/how-to-disable-netbios-over-tcp-ip-by-using-dhcp-server-options https://woshub.com/how-to-disable-netbios-over-tcpip-and-llmnr-using-gpo/ […]

Reply
jp February 27, 2020 - 8:12 am

You can actually wildcard the Interfaces for the WINS registry value, turning this into a neat one liner without looping:
set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\services\NetBT\Parameters\Interfaces\tcpip* -Name NetbiosOptions -Value 2

Reply
Robert May 7, 2020 - 9:42 am

thanks. this helped me.

Reply
axel April 5, 2023 - 9:38 am

missed: -Path after set-itemproperty

should work:
set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\NetBT\Parameters\Interfaces\tcpip* -Name NetbiosOptions -Value 2

Reply
My hometown was hit with Ransomware | Brad Proctor September 3, 2020 - 2:56 pm

[…] LLMNR (Link-Local Multicast Name Resolution) and NBNS […]

Reply
Eric July 16, 2021 - 5:45 pm

Regarding this section:
“You can disable the LLMNR protocol on a Windows computer locally via the registry using the following PowerShell commands:”
You will probably find this results in the GPO setting coming out as “Not Configured” instead of Enabled.
I don’t know why this is, but I have replicate the failure dozens of times that I then have to fix, and I can only fix by going into GPEdit on the client and change the setting to Enabled.
I’ve tried exporting and importing the key – it’s a 50-50 success rate, thus not worth the effort.
Web crawling has found others have had the same issue, but the answers are always apply a domain GPO, which doesn’t help if you don’t have a domain.

Reply
Richard November 8, 2021 - 11:39 am

The specified GPO setting only disabled LLMNR broadcasts, but does not disable LLMNR itself.
To do this, you need to enable the setting “Turn off multicast name resolution”, which is also located in Network > DNS Client.

Reply
Michael March 15, 2022 - 2:30 pm

“Disabling LLMNR on Windows Using GPO” –> Why you use “Turn off smart multi-homed name resolution” instead of “Turn off multicast name resolution”. When I read the description of those GPOs the last one seems to be right.

Reply
admin March 16, 2022 - 5:43 am

You’re right, thanks!

Reply
Chris Hozee May 10, 2022 - 12:47 pm

Is a reboot really required after disabling netbios with powershell?

Reply
TM September 8, 2022 - 1:18 am

You can disable/reenable the NIC. But you need to do something for it to reread its config and disable Netbios.

Reply
nd September 8, 2022 - 6:47 pm

The DHCP options haven’t worked for any OS past XP fyi. The DHCP options can be set, but they are pretty useless unless you suddenly have a legacy client show up.

Reply
SysAdmin-E November 21, 2022 - 3:27 am

It worked for me. Make sure you use “Microsoft Windows 2000 Options” in the DHCP options (yes, Windows 2000). My DHCP server is Windows Server 2012 R2 and clients are Windows 10.

Reply
Serg January 21, 2025 - 5:03 am

By default, if the requested hostname does not exist in the DNS, the local client uses the following three alternative methods for name resolution:

Link-Local Multicast Name Resolution: UDP/5355
NetBIOS name broadcast: UDP/137
MulticastDNS: UDP/5353

Therefore, you should additionally disable the mDNS resolution protocol (enabled by default in Windows Server 2022/2019 and 10/11 client operating systems):

reg query “HKLM\System\CurrentControlSet\Services\DNScache\Parameters” | FIND /i “EnableMDNS”

Reply
Stephan January 27, 2025 - 7:06 am

Disable NetBIOS over TCP/IP for all NICs, without need for disable/enable or reboot:

wmic nicconfig where “IPEnabled=true” call SetTcpipNetbios 2

Reply

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMware
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025
  • How to Write Logs to the Windows Event Viewer from PowerShell/CMD

    March 3, 2025
  • How to Hide (Block) a Specific Windows Update

    February 25, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Updating List of Trusted Root Certificates in Windows
  • Configure Google Chrome Settings with Group Policy
  • Configuring FSLogix Profile Containers on Windows Server RDS
  • How to Find the Source of Account Lockouts in Active Directory
  • How to Disable or Enable USB Drives in Windows using Group Policy
  • How to Hide or Show User Accounts from Login Screen on Windows
  • Changing Default File Associations in Windows 10 and 11
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top