Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How to allow incoming connections from specific ip address?

11 Jan 2019   #11
johnhoh

Win7 pro x64
 
 

Quote   Quote: Originally Posted by peter7277 View Post
How to allow incoming connections for ip range? For example, for ip addresses from 198.168.0.101 to 198.168.0.120
no idea. but try this:

open notepad to a new file, call it openup.cmd, put a bunch of lines in it like this:
---------------------------------
netsh advfirewall firewall add rule name="Allow from 192.0.0.101" dir=in action=allow protocol=ANY remoteip=192.0.0.101

netsh advfirewall firewall add rule name="Allow from 192.0.0.102" dir=in action=allow protocol=ANY remoteip=192.0.0.102
---------------------

up to 120. Save the file, add it to your startup folder. Make sure it is not a txt file, it has to be a cmd file.

---------------

edit

based on this page

How to block IP ranges in Windows Firewall - gHacks Tech News

the command

netsh advfirewall firewall add rule name="Allow from 192.0.0.100/120" dir=in action=allow protocol=ANY remoteip=192.0.0.100/120

might be the syntax that specifies the range from 100 to 120.


My System SpecsSystem Spec
.
11 Jan 2019   #12
peter7277

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by johnhoh View Post

based on this page

How to block IP ranges in Windows Firewall - gHacks Tech News

the command

netsh advfirewall firewall add rule name="Allow from 192.0.0.100/120" dir=in action=allow protocol=ANY remoteip=192.0.0.100/120

might be the syntax that specifies the range from 100 to 120.
It worked but for some reason if i use this ip range format '192.168.0.101/120' i get this error "A specified IP address or address keyword is not valid.". I had to use this format to make it work - '192.168.0.0/24'
My System SpecsSystem Spec
11 Jan 2019   #13
johnhoh

Win7 pro x64
 
 

maybe it needs to start with 0. A dash instead of a slash might also work
My System SpecsSystem Spec
.

Reply

 How to allow incoming connections from specific ip address?




Thread Tools




Similar help and support threads
Thread Forum
Software or Windows 7 feature to log incoming network connections
We have a network DVR box in our small office that records from several of our security cameras. It is basically a Windows 7 Embedded Standard OS with a proprietary DVR software on it. We can connect to that DVR from the internet via a static IP using a smartphone. So I was wondering, if there's...
Network & Sharing
How to allow *all* incoming TCP connections
Hello there, I am making a Remote Control program like Teamviewer in VB.Net using the TCP protocol and it works fine locally (in LAN), but nobody outside of my network can connect to my computer. I've tried to add exceptions to all TCP ports and I've tried to totally disable the firewall, but...
System Security
VPN not accepting incoming connections.
Protocol is PPTP It hangs on "Verifying username and password" from the client machines the LAN settings should be fine as this machine is dual booted and clients connect to Ubuntu Server without issue. Win7 gives the following error after getting "stuck" on "Verifying username and...
Network & Sharing
What's the max number of incoming connections (aka VPN) Windows 7 supp
What's the max number of incoming connections (aka VPN) Windows 7 Ultimate supports? I'm getting an error every time I try to connect one machine while the other is connected. Error 937 I believe. Does this mean that windows 7 Ultimate only supports one vpn connection at a time without upgrading...
Network & Sharing
Incoming Connections Troubleshoot Shortcut - Create
How to Create a "Incoming Connections Troubleshoot" Shortcut in Windows 7 This will show you how to create or download a Windows 7 Incoming Connections Troubleshoot shortcut. You can also Pin to Taskbar or Pin to Start Menu this shortcut, or move where you like for easy use.You could also place...
Tutorials


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 00:52.
Twitter Facebook Google+