LAN Networking: Local DNS Name Not Working in Windows Browser for Ubuntu Home Server 'lenovo'

Abstract: Resolve Windows inability to access Ubuntu server by hostname via LAN by installing and enabling the nmbd service for NetBIOS name resolution.

Created: 2026-09-01 by

Windows browsers often fail to resolve Ubuntu hostnames because Windows relies on NetBIOS and WINS for local name resolution, while Ubuntu uses mDNS (Bonjour). To fix this, you must install the nmbd service from the samba-common-bin package on Ubuntu. This enables SMB/CIFS name broadcasting that Windows machines can understand natively without additional configuration.

Understanding the Resolution Gap

When you type a hostname like lenovo into the Windows address bar or run command prompt, Windows does not automatically query DNS servers for local LAN names unless they are explicitly configured in your network profile. Instead, it attempts to resolve the name via several legacy methods. The primary method is NetBIOS over TCP/IP, which requires a server to broadcast its name on the local subnet. Ubuntu, by default, runs systemd-resolved which handles standard DNS queries but does not participate in NetBIOS name broadcasts. Consequently, the Windows machine sends out a NetBIOS name query, receives no reply from the Ubuntu server, and displays an error such as "This site can't be reached" or "DNS_PROBE_FINISHED_NXDOMAIN".

This issue is distinct from general internet connectivity problems. Your home server is likely accessible via IP address (e.g., http://192.168.1.50), proving that the HTTP services are running and the network path is valid. The failure is strictly at the name-to-IP translation layer. While modern Windows versions support mDNS (Zeroconf) if the Bonjour service is installed, most consumer installations do not include this by default. Therefore, relying on mDNS alone is risky. The most robust solution is to make the Ubuntu server speak the language Windows expects: NetBIOS.

Installing Samba Components on Ubuntu

The core tool needed to solve this is nmbd, the NetBIOS name server daemon included in the Samba suite. You do not need to configure Samba shares necessarily, but you do need the background service that advertises the computer's name on the network. Begin by updating your package lists to ensure you have the latest definitions. Open a terminal on your Ubuntu server and execute the following command with sudo privileges:

sudo apt update
sudo apt install samba-common-bin

During installation, you may be prompted to confirm the disk space usage. Press 'Y' to proceed. This package installs nmbd, smbd, and related utilities. Once installed, the system should automatically start the nmbd service if it is part of the standard Samba installation group. However, in minimal Ubuntu Server installations, services might not start automatically upon first package installation. You should verify the status of the service immediately after installation.

Verifying Service Status

Check if the NetBIOS name daemon is active by running:

systemctl status nmbd

If the service is inactive or failed, enable and start it using:

sudo systemctl enable nmbd
sudo systemctl start nmbd

You can also check if the service is listening on UDP port 137, which is the standard port for NetBIOS name services. Use the ss command to verify:

ss -uln | grep 137

If you see output indicating :137 is bound, the service is correctly advertising your hostname. If the output is empty, there may be a firewall rule blocking the traffic or a misconfiguration in the systemd unit file.

Configuring Firewall Rules

Ubuntu Server typically comes with ufw (Uncomplicated Firewall) enabled. Even if nmbd is running, UFW will block incoming NetBIOS broadcasts if not explicitly allowed. You need to permit traffic on ports 137 and 138 (UDP) and optionally 139 (TCP) for NetBIOS session services. Add these rules using the following commands:

sudo ufw allow 137/udp
sudo ufw allow 138/udp
sudo ufw allow 139/tcp

After adding the rules, reload the firewall to ensure changes take effect:

sudo ufw reload

It is important to note that allowing these ports exposes your machine to local network discovery protocols. In a trusted home LAN environment, this is standard practice. If you are concerned about security, ensure your router isolates guest networks from the main LAN where the server resides.

Testing Name Resolution on Windows

Once the service is running and the firewall is configured, you must clear any cached negative resolutions on the Windows client. Windows caches failed DNS lookups for a short period. Open the Command Prompt on your Windows machine and flush the DNS cache:

ipconfig /flushdns

Next, attempt to ping the hostname to see if it resolves to the correct IP address:

ping lenovo

If the ping returns replies with the correct IP address of your Ubuntu server, the name resolution is working. You can now open your browser and navigate to http://lenovo or http://lenovo.local (if mDNS is also working). If it still fails, try accessing it via the full NetBIOS name format, though this is rarely necessary on modern networks.

Alternative: Using .local Domain

If you prefer not to use Samba/NetBIOS, you can rely on mDNS. Ensure the avahi-daemon is installed and running on Ubuntu:

sudo apt install avahi-daemon
sudo systemctl enable --now avahi-daemon

Then, access the server using the .local suffix, e.g., http://lenovo.local. This requires the Windows machine to support mDNS, which Windows 10 and 11 handle better than older versions, but it is less universally reliable than NetBIOS in mixed environments. For pure simplicity in a Windows-heavy office, the Samba approach remains the gold standard.

Frequently Asked Questions

Why does my Windows PC work with IP but not hostname?

This confirms that network connectivity is fine but name resolution is failing. Windows defaults to NetBIOS for local names rather than DNS, so your Ubuntu server must advertise its name via NetBIOS protocols, which standard DNS resolvers do not handle.

Is it safe to leave Samba installed if I don't share files?

Yes, installing samba-common-bin primarily gives you the nmbd service for name resolution. You do not need to configure smb.conf to share directories. The service runs passively to answer name queries and poses minimal risk if your firewall restricts access to the local subnet only.

What if ping works but the browser still fails?

If ping resolves the IP, the browser issue might be due to HTTP vs HTTPS mismatches or firewall blocking port 80/443. Ensure your Ubuntu web server is actually listening on those ports and that UFW allows inbound traffic on ports 80 and 443.

Can I use a different Linux distribution with the same fix?

Yes, most Linux distributions support Samba or Avahi. On Debian-based systems, the commands are identical. On RHEL/CentOS, you would use yum install samba-common-tools and manage services with systemctl. The underlying principle of enabling NetBIOS or mDNS remains the same across platforms.

How do I disable NetBIOS if I change my mind?

To stop advertising your name via NetBIOS, simply stop and disable the nmbd service using sudo systemctl disable --now nmbd. You will then need to rely on mDNS (.local) or static entries in the Windows hosts file for name resolution.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More