The error message “server IP address is not in valid range” is usually on spot.
Your network IP and routers might not match when you’re trying to port-forward, resulting in the error message above.
However, the solution only requires the user to make sure that all numerical values are correct and that the information is accurate.
When the server IP address range is invalid, then DHCP is not enabled or your destination server is not using a static IP address. To solve the problem the user needs to open the network ports and use the internet server IP instead of the public address.
How To Fix When The Server IP Address Is Not In Valid Range?
Let’s start with the basics by enabling DHCP and configuring the DNS settings:
Solution #1 Use DHCP-reserved IP Address
The server IP address will not be invalid range until you’ve got a static IP address and to do so you would need to configure the DNS settings.
Setting a static IP on Windows 10 is easy as long as you’ve got a tutorial to follow so you know exactly where to click.
This operation should be done on the Windows PC server that you’re attempting to port-forward your network device to.
How To Configure DNS?
- Open the Control Panel.
- Press on Network and Internet.
- Select your network.
- Choose the Networking tab.
- Press on Advanced and pick the DNS tab.
- Use 192.167.0.1 for Primary and Secondary DNS entities.
- Click Apply.
How To Create A Static Server IP?
- Open CMD (Command Prompt).
- Type “/ipconfig all”.
- Take a note of the IPv4 address, subnet mask, and default gateway.
- Copy & paste the following command:
netsh interface IP set address name= (name of your network router) static 10.1.2.220 255.255.255.0 10.1.2.1
- Replace “Ethernet0” with the name of your network router.
- Replace “10.1.2.220” with the server IPv4 address.
- Replace “255.255.255.0” with the device subnet mask.
- Replace “10.1.2.1” with the device’s default gateway.
- Hit Enter.
That would create a static IP address for your Windows server and now you will be able to port-forward without your IP being out of range.
In case you received an error, re-attempt the command mind that everything is case and space sensitive.
Note: You change these settings from the Network Settings at the Control Panel.
Solution #2 Open Ports In Firewall
Now when you’ve got a static IP server, the next possibility to address is your firewall.
Every Windows device comes with an enabled Firewall and when your ports are not open, your server IP address is not in valid range port forwarding.
To open the ports on your Windows server firewall follow the steps below:
- Open the Control Panel and go to System and Security.
- Choose Advanced Settings and right-click on Inbound Rules.
- Select New Rule and add the port you need to open.
- Insert the TCP or UDP protocol numbers.
- Click on Allow, then Next.
- Choose a Name for your newly opened port.
- Press on Finish.
This will open the ports for forwarding and when you re-attempt the invalid IP range error should not appear.
However, in some cases…..
Solution #3 Use The Valid Server IP
For port forwarding, you need to use the internal IP address of the server. Your network provides you with a Public IP address and internet IPv4 address.
The error “not in valid range” often appears when the wrong IP address is used in the port-forwarding options.
Here is how to find and use the valid server IP:
- Open (Command Prompt) CMD.
- Type “/ipconfig” and hit Enter.
- Copy the IPv4 from the list of addresses.
- In your router’s settings open the Port-Forwarding page.
- Select the protocols and click Next.
- Paste the internet (IPv4) address.
- Click on Apply & Safe.
You can test by clicking “Check Your Port”, which will tell you whether the forwarding was completed.
Now when you know which IP to use, let’s take a look at some invalid addresses.
Invalid IP Address Example:
Your IP might be invalid when it’s reserved, there is a conflict or there is a range problem such as in your situation.
Here are some occasions in which you’ll have an invalid IP address.
- More than one machine is attempting to assign the same IP.
- Reserved IPs such as “0.0.0.0”, “255.255.255.255, or the local host – “127.0.0.1”.
- Problems with Dynamic Configuration Protocol (DHCP)
Also When IP is out of network range the “not valid range” error appears.
This is when, for finance, you’ve got a range of 192.168.1.1 to 192.168.1.50 where IP “192.168.1.52” will not be in range.
This is why you should make sure that your internet machine IP is in range.
Note: Windows OS sometimes assigns an address before your router does, which leads to an IP conflict and, in turn, you receive the “not in range” error.
Solution #4 Check Values
In case you’ve attempted all of the previous solutions there isn’t much that could be making your IP out of range, so a thorough inspection is the best next step.
You need to check ALL numeric values and we’ll list everything where you could have missed something.
Here is everything that you need to inspect:
- Check port’s range – The separator is a dash “–” with ports from 0 to 65,535.
- Inspect whether the ports you’re using are open in the Firewall.
- Double-check if you’re using the IPv4 (internal IP) of your Windows server.
- Inspect whether the destination and source are both connected to the same network.
- Ensure that there is no missing information in the port-forwarding tab.
In case ALL of this is correct, and you couldn’t identify any flaws but your IP remains in the invalid range, the possibilities decrease.
Let’s next update the firmware of the devices included in the forwarding setup to see whether this will help.
Tip: It’s recommended to restart your router and check for the IP error before proceeding.
Solution #5 Update Firmware
When you’re still seeing the “IP address is not in range”, maybe your router is not up-to-date which is a common cause of port-forwarding problems.
It’s better to update all participant devices including your destination server, router, and third-party source if there is.
You can update the router from the control panel and your destination device by applying the pending Windows updates.
Note: Don’t forget to restart both the router and destination device before re-attempting the port forwarding.
Solution #6 Reset Network Router
By resetting the router, most users have been able to solve the invalid range problem in their setup.
This is the easiest technical solution you can apply but the reset comes with a few downsides.
Your network settings, WiFi, and configurations will be entirely gone and everything should be manually set up after the reset.
Users often reach out to their ISP for help setting up their router after a factory reset.
Here is how to factory reset any router:
- Access the router’s Control Panel, and choose the Reset tab.
- Select Reset To Default.
- Confirm by clicking OK.
- Wait for about 5 minutes.
Alternatively, you can reach within the pinhole and press the reset button. Using a thin and sharp object such as a needle.
When the factory reset is done, insert the opened ports in the Port-Forwarding tab and check whether your IP would remain in a valid range.
Note: The entire port-forwarding process should be done from the beginning after the reset.
Quick Recap:
The solution to invalid server IP range includes setting a static IP for the destination server and configuring the DNS setting. Moreover, the ports should be opened in the Firewall and the Port-Forwarding values should ALL be accurate and valid.
Read Next: Should I Disable DHCP On Second Router?
Last Thoughts:
Here is everything about “server IP address is not in valid range”. We hope that you’re now familiar with how IPs work and when your IP will not be in a valid range.
For more posts such as this one, make sure to check our tech blog to discover a solution to your technical issues.
Finn Wheatley holds a Master’s Degree in Computer Science from UCL, London. He helped small data science consultancy firms, helping large corporations to grow their data capabilities, deploy advanced machine learning-based analytics and troubleshoot tech-related issues. Check out more about him here.