Restricting access to shared folder by IP address.

nektar

New member
Local time
11:45 AM
Messages
3
Location
Central
How do I grant access to local folder based on IP address?

I want to share my D volume only to another computer at my home via its local IP address (10.0.0.2 in this case). It will be shared as read only network folder (with some subfolders which cannot be accessed at all), and I will need to map it as a drive in the other PC. And if someone appear to connected to my router via Wi-Fi, he won't be able to access my shared folders (given the fact that his IP address is something like 10.0.0.3 or 10.0.0.5).

I already set the drive to be shared as read only by Authenticated Users (I made a non-admin user to be logged in to my PC), but apparently anyone who knows my username and password may access the files.

Is there any kind of network policies which allow only to a specific user in specific IP address to view and read my shared folder?

Thanks a lot...
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom build.
OS
Windows 7 Ultimate x64
CPU
Intel Core i7 930
Browser
Firefox
Is the IP static as if it's via DHCP it would change. Is it just via Wi-Fi your blocking on a lot of routers there is an option called user isolation or similar this blocks all Wi-Fi from seeing local PC
 

My Computer

Computer type
PC/Desktop
OS
win 8 32 bit
It is the local IP address of the computer. Not the external one, given by the ISP.
(Appears in "ipconfig /all" command as IPv4 address.)

For example, I have 4 devices connected to my router at home (by LAN or WiFi).


  1. PC for storage and work - Local IP: 10.0.0.1.
  2. PC for music / films / gaming / multimedia - Local IP: 10.0.0.2.
  3. Printer - Local IP: 10.0.0.3
  4. My Phone (via WiFi) - Local IP: 10.0.0.4

I want to share a folder at the work PC (10.0.0.1), only to be seen and accessed by the multimedia PC (10.0.0.2).
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom build.
OS
Windows 7 Ultimate x64
CPU
Intel Core i7 930
Browser
Firefox
As far as I know, there is no built-in option for restricting access based on client IP, but rather only on user/password, then setting permissions on those. Windows will accept all connections from anywhere, as long as they provide the proper credentials.

You could use a firewall to restrict incoming connections on port 445 (the one used for the shared folders though the SMB protocol) only from specific hosts. Windows firewall for example is certainly capable of doing so. This however will block access entirely for those IPs, not only specific users.

I think, however, that your approach is not ideal at all. Putting a block on a particular IP address is not too complicated to bypass (any computer can choose its local address as long as it's not used). Moreover, in your first post you mention some things that may indicate deeper security problems than just an IP control:


And if someone appear to connected to my router via Wi-Fi

A better question would be, why would anyone be allowed into your wifi at all? If your router is only a private network, keep it private, put a strong password on it and don't share that with anyone you don't trust. Anyone else will be simply unable to even enter your local network, therefore unable to even see the computer hosting the protected shares.


but apparently anyone who knows my username and password may access the files.

Yes, that's totally correct. Problem is, nobody but you should ever know your password. That's true for every password you set (for instance, if I knew your SevenForums password, I would be able to impersonate you here). It seems to me that you protect your passwords only lightly and don't care with sharing them freely, so that's the main thing I would do is to proper ensure that your credentials are secret, as every system would assume that they are secret.
If you think that anyone knows your password, just change it and ensure only you know it. Doing so will prevent anyone else but you from accessing your computer.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
If you have the correct type of Router on your system you could add a whitelist of devices that are allowed to connect to your network. This list would not be based on the IP address of devices but on the MAC address which uniquely identifies every network capable device on the planet, (IP addresses in certain circumstances can be the same in different locations ).

The users would still need to know the SSID (name of the wireless you broadcast), plus the password,but would also have to be on the list of devices allowed to access.
You can change the name of the service and the password often which will help but MAC filtering will prevent access for anyone even if they have the credentials correct but are not an allowed laptop, phone, PC or game console

If you choose to go this route you would need to discover the MAC address of each network device you wish to allow and add it to the list of allowed devices. For full cover you would need to do this for Wireless ports and Ethernet Posts even if they are on the same system (laptops are normally this way Desktops less so.

If you can provide the full information of your router I will check to see if this is possible and the steps needed if this is so. if this is a unit supplied by your internet provider you may have to do a little research, Check the website of your Provider, but if you use a router from one of the actual manufacturers it should be straightforward
 

My Computers

System One System Two

  • 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
  • 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
This list would not be based on the IP address of devices but on the MAC address which uniquely identifies every network capable device on the planet, (IP addresses in certain circumstances can be the same in different locations ).

The users would still need to know the SSID (name of the wireless you broadcast), plus the password,but would also have to be on the list of devices allowed to access.
You can change the name of the service and the password often which will help but MAC filtering will prevent access for anyone even if they have the credentials correct but are not an allowed laptop, phone, PC or game console

MAC address filtering is known to be a very weak protection. For one, MACs aren't unique at all, but in rare cases can be duplicated. Moreover, they only need to be unique in a given network segment, certainly not globally unique.
But the real problem is that MAC addresses are really trivial to change with readily available software for every platform. In wifi, the MAC is also sent in plaintext before encryption takes place, so anyone can learn what MACs are actually valid, making it easy to bypass any filter if you really want. The SSID is also public and anyone can learn it. That's why my suggestion was to put the only secrecy in the password, that are mean to be secret anyway.

MAC filtering can maybe deter a few people (certainly many home users) but if you seriously care about security, you need to look into more serious methods.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
Back
Top