Solved How to allow incoming connections from specific ip address?

peter7277

New member
Member
Local time
9:29 AM
Messages
83
The default settings on the firewall are to block all incoming connection and allow all outgoing. My laptop and my android tablet are connected to my wireless home network, and i have some apps on my tablet which i need to connect to my laptop. How to create firewall rule which will allow all connections from the tablet ip address?
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
Normally there is a setting to allow trafifc on the local subnet
 

My Computer My Computer

At a glance

win 8 32 bit
Computer type
PC/Desktop
OS
win 8 32 bit
There are a number of parameters that need to be setup to allow communication between Android and PC this can be done manually within windows but you would need to know the data types and the Port s that are to be used.

It may be simpler to use a 3rd party solution - One such is Airdroid that is free, (with some limitations), that will do all the work for you

You need an app on your tablet and either a small app on the PC or you can use a web based solution on the PC

Take a look here ... Home | AirDroid
 

My Computers My Computers

  • At a glance

    Windows 11 Pro x64 [Latest Release and Releas...Ryzen 9 5950X, 3.8 - 5.2 MHz64GB [2 x 32GB] DDR4 3200MHz4GB NVIDIA GEFORCE GTX 1650 Ti
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    ChillBlast - Custom to my design
    OS
    Windows 11 Pro x64 [Latest Release and Release Preview]
    CPU
    Ryzen 9 5950X, 3.8 - 5.2 MHz
    Motherboard
    Asus Prime X570-Pro
    Memory
    64GB [2 x 32GB] DDR4 3200MHz
    Graphics Card(s)
    4GB NVIDIA GEFORCE GTX 1650 Ti
    Sound Card
    On-board SPDIF to 5.1 System + HDMI [5.1 system]
    Monitor(s) Displays
    32" UHD 32 Bit HDR Monitor + 43" UHD 4K 32Bit HDR TV
    Screen Resolution
    2 x 3840 x 2160 @60Hz
    Hard Drives
    1TB M2 SSD OS, 500GB Fast Access SSD, 2 x 8TB Data + Various Externals from 1TB to 4TB, 10TB NAS
    PSU
    NZXT C750 80 PLUS Gold 750W Modular PSU
    Case
    Workstation Case [Matt Black]
    Cooling
    NZXT Kraken X63 280mm CPU Cooler +2x Quiet Case fans
    Keyboard
    Logitech Wireless MX Keys & K400 + others
    Mouse
    Logitech Wireless MX Master 3S
    Internet Speed
    920 MB Down 50 MB Up
    Antivirus
    BitDefender Total Security Pro
    Browser
    Chrome (always run latest Non-Beta)
    Other Info
    Also run ...
    Laptop - Quad 8GB - Windows 10 Pro x64
    Nexus 7 Android tablet x2
    Samsung 10.2" tablet
    Blackview TAB 8 4G Android Tablet c/w Keyboard
    Wacom Intuos Pro Medium Pen Pad
    Wacom Intuos Pro Small Pen Pad
    Wacom Expresskeys Remote
    Loopdeck+ Graphics Controller
    Shuttle Pro v2 Control
  • At a glance

    Windows 11 Pro x64 Latest RPIntel I7 10750H 5.0GHz32GB [2x16GB] DDR4 2933 MHznVidia GTX1650Ti 4 GB GDDR6
    Computer type
    Laptop
    System Manufacturer/Model Number
    Dell XPS 17 10750H
    OS
    Windows 11 Pro x64 Latest RP
    CPU
    Intel I7 10750H 5.0GHz
    Motherboard
    Dell XPS
    Memory
    32GB [2x16GB] DDR4 2933 MHz
    Graphics Card(s)
    nVidia GTX1650Ti 4 GB GDDR6
    Sound Card
    Stock [Realtek] 4 Speaker
    Monitor(s) Displays
    17" IPS UHD+ Infinity Edge Touchscreen
    Screen Resolution
    3840 x 2400
    Hard Drives
    2TB M2 NVMe, 4TB External + various 500GB & 1TB External NVMe (also have access to spinner HDD from
    PSU
    Stock
    Case
    Stock XPS Aluminium & Carbon Fibre
    Cooling
    Stock - Active Fan Control
    Keyboard
    Backlit + Various Logitech
    Mouse
    Stock Track Pad + Logitech MX Trackball
    Internet Speed
    72 MB Down 18MB Up
    Browser
    Chrome
    Other Info
    Also run ...
    Laptop - Quad 8GB - Windows 10 Pro x64
    Nexus 7 Android tablet x2
    10.2" tablet
    Sony Z3 Android Smartphone
    Wacom Intuos Pro Medium Pen Pad
    Wacom Intuos Pro Small Pen Pad
    Wacom Expresskeys Remote
    Loopdeck+ Graphics Controller
    Shuttle Pro v2 Control Pad
    10TB NAS
I want to do this without installing any application on my laptop.I just want to know if i can create a rule that will allow incoming connection from specific ip address and block all other incoming connection. For example, i have Total Commander app wiht LAN plugin on my tablet and if i want to connect to my laptop i have to allow all incoming connection, and i don't want to do that. I want to block all incoming connections and create rules only for connections from specific ip addresses.
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
the CMD command

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

will allow all inbound traffic from 192.0.55.55

I assume you could also do this by adding a new rule in windows firewall advanced settings in the control panel gui

You should also go into your router and make sure to set your inbound device to a static address (192.0.55.55 in the above example), otherwise it won't always have the same address and will not be able to get in
 
Last edited:

My Computer My Computer

At a glance

Win7 pro x64stock i7 7700kCorsair Vengeance LPX 16GB (2x8GB) DDR4 @ 320...integrated Intel HD 630
Computer type
PC/Desktop
Computer Manufacturer/Model Number
diy
OS
Win7 pro x64
CPU
stock i7 7700k
Motherboard
Gigabyte Z270N-WIFI mini-ITX
Memory
Corsair Vengeance LPX 16GB (2x8GB) DDR4 @ 3200MHz
Graphics Card(s)
integrated Intel HD 630
Sound Card
onboard Realtek ALC1220
Monitor(s) Displays
two vertically mounted samsung 55" 4k un55mu8000
Screen Resolution
1920x1280
Hard Drives
256GB Samsung EVO 960 M.2 pci-e NVMe SSD
PSU
SilverStone Nightjar ST45NF 450Watt Fanless
Case
No case. Motherboard is mounted directly onto power supply
Cooling
Evercool low profile 815EP with Panaflow 12L fan at 7v
Keyboard
Ortek MCK-86 mini
Mouse
Belkin 5-button USB
Internet Speed
spectrum 400mbps
You don't state the firewall is it windows or third party?
 

My Computer My Computer

At a glance

win 8 32 bit
Computer type
PC/Desktop
OS
win 8 32 bit
netsh advfirewall firewall add rule name="Allow from 192.0.55.55" dir=in action=allow protocol=ANY remoteip=192.0.55.55

will allow all inbound traffic from 192.0.55.55

I assume you could also do this by adding a new rule in windows firewall advanced settings in the control panel gui

You should also go into your router and make sure to set your inbound device to a static address (192.0.55.55 in the above example), otherwise it won't always have the same address and will not be able to get in

Thanks, it worked. But how to do that also from the gui?
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
Thanks, it worked. But how to do that also from the gui?


control panel > windows firewall > advanced settings > right click on Inbound Rules > New Rule, then you figure it out from there. Have never done it.
 

My Computer My Computer

At a glance

Win7 pro x64stock i7 7700kCorsair Vengeance LPX 16GB (2x8GB) DDR4 @ 320...integrated Intel HD 630
Computer type
PC/Desktop
Computer Manufacturer/Model Number
diy
OS
Win7 pro x64
CPU
stock i7 7700k
Motherboard
Gigabyte Z270N-WIFI mini-ITX
Memory
Corsair Vengeance LPX 16GB (2x8GB) DDR4 @ 3200MHz
Graphics Card(s)
integrated Intel HD 630
Sound Card
onboard Realtek ALC1220
Monitor(s) Displays
two vertically mounted samsung 55" 4k un55mu8000
Screen Resolution
1920x1280
Hard Drives
256GB Samsung EVO 960 M.2 pci-e NVMe SSD
PSU
SilverStone Nightjar ST45NF 450Watt Fanless
Case
No case. Motherboard is mounted directly onto power supply
Cooling
Evercool low profile 815EP with Panaflow 12L fan at 7v
Keyboard
Ortek MCK-86 mini
Mouse
Belkin 5-button USB
Internet Speed
spectrum 400mbps
the CMD command

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

will allow all inbound traffic from 192.0.55.55

I assume you could also do this by adding a new rule in windows firewall advanced settings in the control panel gui

You should also go into your router and make sure to set your inbound device to a static address (192.0.55.55 in the above example), otherwise it won't always have the same address and will not be able to get in

How to allow incoming connections for ip range? For example, for ip addresses from 198.168.0.101 to 198.168.0.120
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
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.
 
Last edited:

My Computer My Computer

At a glance

Win7 pro x64stock i7 7700kCorsair Vengeance LPX 16GB (2x8GB) DDR4 @ 320...integrated Intel HD 630
Computer type
PC/Desktop
Computer Manufacturer/Model Number
diy
OS
Win7 pro x64
CPU
stock i7 7700k
Motherboard
Gigabyte Z270N-WIFI mini-ITX
Memory
Corsair Vengeance LPX 16GB (2x8GB) DDR4 @ 3200MHz
Graphics Card(s)
integrated Intel HD 630
Sound Card
onboard Realtek ALC1220
Monitor(s) Displays
two vertically mounted samsung 55" 4k un55mu8000
Screen Resolution
1920x1280
Hard Drives
256GB Samsung EVO 960 M.2 pci-e NVMe SSD
PSU
SilverStone Nightjar ST45NF 450Watt Fanless
Case
No case. Motherboard is mounted directly onto power supply
Cooling
Evercool low profile 815EP with Panaflow 12L fan at 7v
Keyboard
Ortek MCK-86 mini
Mouse
Belkin 5-button USB
Internet Speed
spectrum 400mbps
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 Computer My Computer

At a glance

Windows 7 Ultimate x64
Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
maybe it needs to start with 0. A dash instead of a slash might also work
 

My Computer My Computer

At a glance

Win7 pro x64stock i7 7700kCorsair Vengeance LPX 16GB (2x8GB) DDR4 @ 320...integrated Intel HD 630
Computer type
PC/Desktop
Computer Manufacturer/Model Number
diy
OS
Win7 pro x64
CPU
stock i7 7700k
Motherboard
Gigabyte Z270N-WIFI mini-ITX
Memory
Corsair Vengeance LPX 16GB (2x8GB) DDR4 @ 3200MHz
Graphics Card(s)
integrated Intel HD 630
Sound Card
onboard Realtek ALC1220
Monitor(s) Displays
two vertically mounted samsung 55" 4k un55mu8000
Screen Resolution
1920x1280
Hard Drives
256GB Samsung EVO 960 M.2 pci-e NVMe SSD
PSU
SilverStone Nightjar ST45NF 450Watt Fanless
Case
No case. Motherboard is mounted directly onto power supply
Cooling
Evercool low profile 815EP with Panaflow 12L fan at 7v
Keyboard
Ortek MCK-86 mini
Mouse
Belkin 5-button USB
Internet Speed
spectrum 400mbps
Back
Top