LAN Security Best Practices (within LAN)
-
Thanks everyone for the comments.
I need to dig in more on special switches, Vlans, and NAC as it seems.
For the time i just gave all the users static dhcp lease according the mac address of each device and narrow down the dhcp server to 1 available IP (which is the minimum allowed) for example : 192.168.1.180-192.168.1.180 and then i have assigned this IP as a virtual IP alias on the pfsense device to indirectly disable the IP assignment.
So the known dhcp static leases are working through the dhcp server and static lease that is still enabled, but the dhcp server cannot actually assign more IP's to clients. -
@Gertjan said in LAN Security Best Practices (within LAN):
edit : ok, true, DHCP won't work anymore so when DHCP leases time out, devices will loose their IP etc and the "networking" comes to a halt.
Hello, i run on this option of DHCP Server , it seems that static dhcp entries will be assigned, even if the dhcp is disabled.
What is your comment? -
Static ARP entries are added. DHCP will still be disabled so clients won't pull a lease. All clients would need to be statically configured.
-
@Bambos who exactly is going to be plugging into your network in the first place? Is this a work setup with ports under cubes that you have enabled? unused ports in a work setup should be disabled, and if your worried about someone coming in and unplugging a machine and plugging in, port security would keep them from connecting - unless they knew the mac of the machine they unplugged.
You asked for best practices - what your doing is not best practice.. What is best practice if your concerned with unwanted devices connecting to your network via a wire - run a nac.
-
@johnpoz yes , thank you. best practices with the existing setup (without nac - just having a pfSense).
-
@Bambos again who is going to access your wired network.. Offices are normally secure with only employees working there.. A home - who is in your house that you don't want plugging into your network.
You seem to be wanting a solution to a problem that does not exist..
What is the scenario your concerned with exactly... There is nothing pfsense can do to stop someone from plugging into a switch port on your network.. Even if they don't get an IP, or even if pfsense has static arp and won't talk to them on any IP in your network. Even if just create a dupe IP on your network.. The would still be able to talk to anything else on the network.
If you want to control who has access to the physical network.. Pfsense is not the answer, this is done at the switch ports, or something like a nac that control access to the switch ports. Now pfsense could run the radius server that is involved in your 802.1x portion of your NAC used to access your network.
Even cheap entry level smart switches support the ability to turn off unused port, you might need something a bit more advanced that allows for port security or ability to be used in a nac.
If you want it to make it a bit more difficult you could require tags on all the ports, where the device has to use a vlan tag to talk on that network. They would then need to know what tag to use, and their device would have to have the ability to set the tag, etc.
Please explain the exact scenario your concerned about, and we can discuss the best way to mitigate that scenario - or even if there is a way. But pfsense has no control over some switch port on your network.
-
@johnpoz Hello Sir, and thanks for taking the time to put some thinking to this.
The scenario is office network, (usually secured as you said) , but with an open door to the public and visitors come and go. i agree with you that any firewall / router cannot function on layer2. My target is not to achieve NAC with pfSense, is just to not have everything wide open and easy accessible if someone decides to plug a device and scan things. at least to buy some time. so disable dhcp is something i consider together with ARP entries.
I have enabled for test the static ARP entries, and seems that only the static DHCP leases (with MAC Address) was able to stay on then LAN. The devices without static dhcp lease and normal static ip settings, loose the connection. So something might be helpful there... i will repeat the test with the dhcp server enabled and disabled with the static ARP and see what's going on.
Another idea is to leave the dhcp server with a range of just one IP and with another app, scan this IP and email the admin in case of any host or ping detection. (like honeypot).
Thanks again for the comments and any possible suggestion will be tested !
-
@Bambos The most common sense thing to do would be to just disable ports your not using.. And depending on what switch(es) you have another simple thing to do would be port security.. This would prevent your exact scenario.. With zero need to do anything with static arp or dhcp..
Your static arp or lack of dhcp doesn't prevent someone from scanning.. Its simple enough to plug into a port and scan.. You don't really even need to to know what the IP range is.. And would only take seconds seeing any broadcast or arp traffic to understand what IP range is being used.
Port security would prevent anyone from unplugging an existing device and connecting.. Unless they also knew the mac address of the device they unplugged.
your static arp or lack of dhcp does nothing but cause you work - and would not prevent anyone from plugging into any port be it they unplug something first or just the port is open and scanning.
I would disable any unused ports, even the cheapest of smart switches support this. And if you have switches that can do port security, set that up.. This is going to be far less work in the long run then dealing with dhcp and static arps which doesn't actually prevent the thing your worried about anyway.
https://www.pynetlabs.com/port-security-in-computer-network/
Depending on what your switch(es) support you could also leverage 802.1x and freeradius on pfsense where the client has to auth.. Lets call it a poor mans nac, even if not fully blown sort of nac.
Another thing you could look into - if your switches support it is private vlans.. This can be setup to prevent only ports to talk to other specific ports.. So like everyone could say talk to the server or the gateway, say a printer - but they couldn't talk to themselves. This is a good thing to do because it limits other devices from talking to other devices on the network they shouldn't be talking to - this can help slow down or prevent the spread of worms or ransomware, etc.
-
@johnpoz thank you very much for the valuable information and directions. At the moment is a small office with no special smart switches. Just unmanaged switches.
But i liked the idea of poor mans nac with freeradius. maybe i will try that.
-
@Bambos your switch needs to support that. If you just have dumb switch its not going to work. Pretty much any 40$ smart switch turn off a port not in use. But to do something like port security that is just mac based, or using 802.1x you need a slightly better switch.
If your goal is locking down your physical access, you need a switch that provides some methods to do that. Not providing IP sure isn't going to stop them from scanning other devices once they have a physical connection.