Configuring Specific IP Addresses with DHCP Offer on Windows Firewall

Abstract: Resolve APIPA issues by allowing UDP port 68 inbound traffic in Windows Defender Firewall for specific DHCP servers.

Created: 2026-09-13 by

Allowing specific IP addresses to receive DHCP offers requires configuring Windows Defender Firewall rules for UDP port 68. By default, the firewall may block incoming DHCP responses if strict inbound filtering is active or if a custom rule interferes with network stack communication. This guide details how to create precise exceptions for trusted DHCP servers while maintaining security.

Understanding DHCP Traffic and Firewall Interception

DHCP (Dynamic Host Configuration Protocol) relies on a client-server model where the client broadcasts a request and the server responds with an offer. The client listens on UDP port 68, while the server sends from UDP port 67. In modern Windows environments, Windows Defender Firewall typically allows this traffic by default under "Core Net" settings. However, issues arise when administrators apply hardened security profiles, use third-party security suites, or have previously created restrictive inbound rules that inadvertently drop these packets. When a specific IP address fails to obtain an IP configuration, it often results in an APIPA address (169.254.x.x), indicating the DHCP handshake failed. If you are managing a segmented network or a DMZ where only certain subnets should receive DHCP services, you must ensure the firewall permits these specific interactions. It is crucial to distinguish between blocking the initial broadcast (which is outbound from the client) and blocking the response (which is inbound). Most connectivity issues stem from the latter being filtered out by overly aggressive inbound policies. For more context on how firewall settings interact with network adapters during installation or updates, you might find Windows 11 23H2 Installation: Firewall Drops DHCP, Reaktek 2.5GbE 8125 Adapter Connection Issues helpful, as it discusses similar adapter-level firewall conflicts.

Verifying Default Firewall Behavior

Before creating new rules, verify whether existing rules are causing the conflict. Open the Windows Defender Firewall with Advanced Security console. Navigate to Inbound Rules and look for rules related to "File and Printer Sharing" or "Core Networking." Specifically, check for a rule named "File and Printer Sharing (Echo Request - ICMPv4-In)" which is unrelated, but more importantly, look for rules governing "DHCP Client." The standard rule that allows DHCP responses is usually titled "File and Printer Sharing (Echo Request - ICMPv4-In)" is incorrect; the correct one is often implicit in the "Network Discovery" or "Remote Event Log Management" profiles, but explicitly, there is no single rule named "DHCP Server" on the client side because the client does not listen on port 67. Instead, the client's ability to receive on port 68 is governed by the general "Public," "Private," and "Domain" profile settings. If your network profile is set to Public, Windows applies stricter filtering. Ensure your network location is correctly identified as Private or Domain. You can change this via Settings > Network & Internet > Ethernet (or Wi-Fi) > Properties. Setting it to Private allows most local subnet communications, including DHCP, without explicit rule creation. If you suspect a specific rule is blocking the traffic, you can disable rules temporarily to test. Right-click a suspicious inbound rule and select Disable Rule. Test the connection immediately after disabling. If the IP address is obtained successfully, that rule was the culprit. Remember to re-enable it afterward and modify its scope instead of leaving it disabled permanently.

Creating a Specific Inbound Rule for UDP Port 68

If the default behavior is insufficient or if you need to allow DHCP offers from a specific remote server IP that is not on the local subnet, you must create a custom inbound rule. This approach provides granular control over which source IPs can send DHCP responses to your machine. Open the Windows Defender Firewall with Advanced Security. Click on Inbound Rules in the left pane, then select New Rule in the right action pane. In the Rule Type window, select Port and click Next. In the Protocols and Ports window, choose UDP for the protocol type. Enter 68 in the Specific local ports field. Click Next. In the Action window, select Allow the connection and click Next. In the Profile window, select the appropriate network profiles (Domain, Private, Public) depending on where this rule should apply. Typically, selecting all three ensures coverage, but restricting it to Private or Domain is safer for production environments. Click Next. In the Name window, provide a descriptive name such as "Allow DHCP Server Response from Specific IP." Add a description like "Permits UDP port 68 input from trusted DHCP server." Click Finish. Once the rule is created, you must edit it to restrict the scope to specific IP addresses. Double-click the newly created rule. Go to the Scope tab. Under Remote IP addresses, select These IP addresses. Click Add and enter the specific IP address of the DHCP server you wish to allow. For example, if your DHCP server is at 192.168.1.10, add that exact address. You can also use a subnet mask if multiple servers exist within a range, but entering specific IPs is more secure. Click OK to save the changes. This rule will now permit incoming UDP packets on port 68 only from the specified source, ignoring requests from any other IP address.

Troubleshooting and Validation

After applying the rule, validate the configuration using command-line tools. Open Command Prompt as Administrator and run ipconfig /release followed by ipconfig /renew. Observe the output. If successful, you will see a new IPv4 address assigned. If it fails, check the event viewer for DHCP client errors. Look under Applications and Services Logs > Microsoft > Windows > DHCP-Client. You can also use netsh to verify the rule status. Run netsh advfirewall firewall show rule name="Allow DHCP Server Response from Specific IP" to confirm the rule exists and has the correct parameters. Additionally, consider checking if your antivirus software has its own firewall module that might override Windows Defender settings. Many third-party security suites have their own "Network Protection" features that require separate configuration to allow DHCP traffic. If you are experiencing persistent issues despite correct firewall rules, consult Understanding Default Network Settings in Windows Defender Firewall to understand baseline behaviors that might be interfering with your custom configurations. Finally, ensure that the DHCP server itself is configured to respond to requests from the client's MAC address or IP range. While the firewall issue is on the client side, server-side restrictions can also cause failures. Verify that the server's lease database includes the client or is willing to assign a new lease. If the client receives an offer but cannot accept it due to other network constraints, the problem lies outside the firewall rule.

Frequently Asked Questions

Why does my computer get an APIPA address even with correct firewall rules?

An APIPA address indicates the DHCP handshake never completed, suggesting the server never received the request or the response was dropped. Check if your network profile is set to Public, which blocks many inbound connections. Also, verify that the DHCP server is reachable via ping before attempting renewal.

Can I use a subnet mask in the DHCP firewall rule scope?

Yes, you can specify a subnet mask in the Scope tab of the firewall rule. This allows you to permit DHCP responses from an entire range of servers rather than individual IPs. However, using specific IPs is recommended for higher security to prevent unauthorized servers from responding.

Does this rule affect IPv6 DHCP (SLAAC)?

No, this rule specifically targets UDP port 68 for IPv4 DHCP. IPv6 uses Stateless Address Autoconfiguration (SLAAC) or DHCPv6, which operates on different protocols and ports. To allow DHCPv6, you would need a separate rule for UDP port 546 and 547.

What if my antivirus blocks the DHCP traffic despite the Windows rule?

Third-party antivirus suites often include their own firewalls that operate independently of Windows Defender. You must check the settings within your antivirus software to ensure it allows DHCP traffic. Look for options like "Network Shield" or "Firewall" within the AV interface and add an exception for UDP port 68.

How do I remove a specific IP from the allowed list?

Edit the inbound rule by double-clicking it in the Inbound Rules list. Navigate to the Scope tab, select the IP address you want to remove from the list, and click Remove. Click OK to save the changes. The next time the system processes network traffic, the specified IP will be blocked again.

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