Switch Port Security: Keep a Stranger's Laptop Off Your LAN
Switch port security on TP-Link and MikroTik: disable unused ports, bind the cash desk, isolate cameras, block rogue DHCP and ARP spoofing.
On this page
A visitor who plugs a laptop into a spare wall socket, or into the cash desk port while the cashier is away, ends up on the exchange office network: they can see the cash desk and the cameras, run their own DHCP server or pose as the router. After the six steps below, that laptop gets no access to the cash desk or the cameras, and DHCP and ARP spoofing stop working. This guide assumes the network is already split into VLANs as described in Network Segmentation for a Crypto Exchange Office.
Plan
| Step | What we do | Time |
|---|---|---|
| 1 | Check that the switch has the features you need | 10 min |
| 2 | Disable and label ports | 15 min |
| 3 | Bind the cash desk port to the cashier's computer | 15 min |
| 4 | Isolate the camera ports | 15 min |
| 5 | Block rogue DHCP and ARP spoofing | 20 min |
| 6 | Test with a laptop in a socket | 20 min |
What someone with a laptop does on an unprotected network
So you know exactly what each step closes off:
- Plugs into a spare socket and gets an address on the shared network → closed by step 2.
- Swaps in their own laptop for the cashier's computer while the cashier is away → step 3.
- Plugs into a camera port and attacks the NVR or neighboring cameras → step 4.
- Runs their own DHCP server — devices get the laptop's address as their gateway and send traffic through it → step 5.
- Spoofs ARP — poses as the router to the cashier's computer without any DHCP → step 5.
- Leaves a mini PC with an LTE modem in a socket behind a cabinet for weeks → steps 2 and 3 (the port is disabled or won't let an unknown device in).
Step 1. Check that the switch has the features you need
Why: an unmanaged switch can't do anything in this guide — it has to be replaced.
How. Find the model on the label and open its specifications on the TP-Link website. Look for these features by name:
| Feature in the specifications | For which step |
|---|---|
| 802.1Q VLAN | all |
| Port Security or MAC VLAN Security | step 3 |
| Port Isolation | step 4 |
| DHCP Snooping or DHCP Filter | step 5 |
| ARP Detection / IP-MAC Binding | step 5 |
- TP-Link LS105G, TL-SG1005D and similar unmanaged switches — not suitable.
- TP-Link Easy Smart (TL-SG105E, TL-SG108E) — have VLANs and port disabling, but usually no binding or DHCP protection.
- TP-Link JetStream (TL-SG2008P, TL-SG2210P and others) — suitable; the feature set depends on the model.
- MikroTik (hAP, CRS) — everything is configured with the commands below.
Done when: your model's specifications list the features for steps 3–5, or you've bought a switch that has them.
Step 2. Disable and label ports
Why: a disabled port is a socket where plugging anything in is pointless.
How.
TP-Link in Omada: Devices → the switch → Ports → a spare port → Edit → Status: Disable; in the port name field, write where it leads ("Cash desk", "NVR", "Socket by the window").
TP-Link without a controller (JetStream web interface): the port settings section (L2 Features → Switching → Port → Port Config) → set Status: Disable on spare ports → Apply → Save Config.
What the screen looks like. The Port Config page shows a table of ports: one row per port, with columns for description, status, speed and duplex. You can tick several ports and change their status at once. Changes take effect after Apply, but are lost on reboot unless you click Save Config.
MikroTik:
/interface ethernet
set ether1 comment="Uplink to router"
set ether2 comment="Cash desk"
set ether3 comment="NVR"
set ether4 comment="Access point"
set ether5 comment="Owner laptop"
set ether6 comment="Camera 1"
set ether7 comment="Camera 2"
disable ether8
Label the wall sockets with the same names.
Check: a laptop in the socket of a disabled port — no link (the network card LED stays off).
Done when: all unused ports are disabled, and the ones in use are labeled both on the switch and on the sockets.
Step 3. Bind the cash desk port to the cashier's computer
Why: otherwise any laptop plugged into the cash desk socket lands on the cash desk network.
How.
- Find the MAC address of the cashier's computer: run
getmac /von it (Windows) and write down the address of the Ethernet adapter.
TP-Link JetStream (web interface): Security → Port Security → the cash desk port → Max Learned MAC: 1, Status: Enable, entry aging mode — Permanent (static) → Apply → Save Config. If the model supports IP-MAC Binding, add an entry: the cash desk IP, the cash desk MAC, the cash desk port.
What the screen looks like. Port Security is a table of ports: for each port you set the maximum number of MAC addresses, the address learning mode and the status. Tick the port you need, enter the values in the row above the table and click Apply.
MikroTik — the binding lives on the router: on the cash desk network, an address is handed out only to a known MAC, and the router won't talk to unknown devices:
/ip dhcp-server lease
add server=dhcp-cash address=10.10.10.10 mac-address=AA:BB:CC:DD:EE:01 comment="Cash desk PC"
/ip dhcp-server
set dhcp-cash address-pool=static-only add-arp=yes
/interface vlan
set vlan10-cash arp=reply-only
- Add to the admin instructions: "when replacing the cashier's computer, update the MAC in the binding."
Check: in step 6 (item 2).
Done when: only the cashier's computer works on the cash desk port.
Step 4. Isolate the camera ports
Why: a hacked camera shouldn't see neighboring cameras, the NVR on unnecessary ports, let alone the cash desk.
How. First check where the cameras are connected:
- To the NVR's PoE ports — the cameras are already on its internal network; only the NVR faces the switch. It's enough for the NVR port to be on the "Cameras" network (VLAN 20). Go to step 5.
- To a separate PoE switch — set up isolation as described below.
TP-Link JetStream: L2 Features → Port Isolation → for each camera port, leave only the NVR port and the uplink in the list of allowed ports → Apply → Save Config. In Omada — in the port profile or the switch's isolation settings (the name depends on the controller version).
What the screen looks like. In Port Isolation you select a port and tick the ports it's allowed to forward traffic to; the table below shows that list for each port. Use the table to confirm that the camera ports list only the NVR and the uplink.
MikroTik: camera ports go in VLAN 20, with a bridge "horizon" between them: ports with the same horizon don't forward traffic to each other.
/interface bridge port
set [find interface=ether6] pvid=20 horizon=1
set [find interface=ether7] pvid=20 horizon=1
set [find interface=ether3] pvid=20
Check: a laptop in a camera port (unplug the camera for a minute) — nmap -sn 10.10.20.0/24 shows only the NVR, no neighboring cameras.
Done when: the cameras see only the NVR.
Step 5. Block rogue DHCP and ARP spoofing
Why: without this, a laptop on any port can become the "router" for its neighbors.
How.
TP-Link JetStream:
- Security → DHCP Snooping (DHCP Filter on some models): enable globally and for VLANs 10, 20, 30.
- Mark the port to the router (the uplink) as Trusted; leave the rest untrusted.
- Security → ARP Detection (if available): enable for the same VLANs, uplink — Trusted.
- Save Config.
MikroTik:
/interface bridge
set bridge1 dhcp-snooping=yes
/interface bridge port
set [find interface=ether1] trusted=yes
If the router is the MikroTik itself and DHCP runs on it, check after enabling that devices still get addresses. On MikroTik, ARP spoofing is blocked by arp=reply-only on the router interfaces (step 3) and by the cash desk being alone on its network.
Check: in step 6 (item 4).
Done when: DHCP replies come only from the router port.
Step 6. Test with a laptop in a socket
Why: a configuration nobody tested fails somewhere half the time.
How. A laptop with Linux (or a bootable Kali USB stick), a 20-minute window outside business hours.
| # | Where we plug in | Command | Expected |
|---|---|---|---|
| 1 | disabled port | — | no link |
| 2 | cash desk port (cashier's computer unplugged) | sudo dhclient -v eth0 |
no address assigned |
| 2a | same port, address set manually | sudo ip addr add 10.10.10.77/24 dev eth0 && ping -c3 10.10.10.1 |
no ping |
| 3 | camera port | nmap -sn 10.10.20.0/24 |
NVR only |
| 4 | guest or camera network port | sudo dnsmasq --no-daemon --interface=eth0 --dhcp-range=10.10.20.200,10.10.20.210 |
neighboring devices don't get an address from the laptop |
| 5 | switch web interface | log in with admin/admin |
login fails |
Record the results with the date — this is your test record. For an exchange office in Georgia, it serves as evidence for the cybersecurity framework the National Bank of Georgia (NBG) requires of VASPs by July 1, 2027.
Done when: all five rows match the expected results.
Checklist
| # | What to check | How to confirm | ☐ |
|---|---|---|---|
| 1.1 | The switch is managed | The model from the label is found on the manufacturer's website, and its specifications list 802.1Q VLAN | ☐ |
| 1.2 | Features for steps 3–5 are available | The specifications list Port Security (or MAC VLAN Security), Port Isolation, DHCP Snooping (or DHCP Filter), ARP Detection (or IP-MAC Binding); MikroTik hAP and CRS are suitable | ☐ |
| 2.1 | Spare ports are disabled | TP-Link: in the port table (Port Config, or Devices → Ports in Omada) spare ports have status Disable; MikroTik: /interface ethernet print — they're marked X |
☐ |
| 2.2 | A disabled port gives no link | A laptop in the socket of a disabled port — the network card LED stays off | ☐ |
| 2.3 | Ports are labeled on the switch and on the sockets | Every port in use has a name or comment ("Cash desk", "NVR"), and the socket has the same label | ☐ |
| 2.4 | Settings survive a reboot (TP-Link) | After Save Config, reboot the switch outside business hours — disabled ports stay disabled | ☐ |
| 3.1 | The binding holds the cashier's computer MAC | The MAC from getmac /v on the cashier's computer matches the MAC in Port Security / IP-MAC Binding or in /ip dhcp-server lease print |
☐ |
| 3.2 | The cash desk port allows only one device | TP-Link: the cash desk port has Max Learned MAC = 1, Status: Enable; MikroTik: dhcp-cash has address-pool=static-only, vlan10-cash has arp=reply-only |
☐ |
| 3.3 | A stranger's laptop on the cash desk port doesn't work | Checks 2 and 2a in step 6: no address assigned, no ping to the gateway | ☐ |
| 3.4 | The procedure for replacing the cashier's computer is written down | The admin instructions include "update the MAC in the binding" | ☐ |
| 4.1 | You know where the cameras are connected | The device map shows for each camera: an NVR PoE port or a switch port | ☐ |
| 4.2 | Camera ports are isolated | TP-Link: L2 Features → Port Isolation — camera ports list only the NVR and the uplink; MikroTik: /interface bridge port print detail — camera ports have horizon=1 |
☐ |
| 4.3 | A camera can't see neighboring cameras | A laptop in place of a camera: nmap -sn 10.10.20.0/24 — no neighboring cameras in the output |
☐ |
| 5.1 | DHCP Snooping is enabled | TP-Link: Security → DHCP Snooping — enabled globally and for VLANs 10, 20, 30; MikroTik: /interface bridge print — dhcp-snooping=yes |
☐ |
| 5.2 | Only the router port is trusted | TP-Link: only the uplink has Trusted status; MikroTik: /interface bridge port print detail — trusted=yes only on ether1 |
☐ |
| 5.3 | ARP spoofing protection is enabled | TP-Link: Security → ARP Detection enabled for the same VLANs, uplink Trusted; MikroTik: /interface vlan print detail — vlan10-cash has arp=reply-only |
☐ |
| 5.4 | Your own devices still get addresses | Reconnect the cash desk cable and a phone to the staff Wi-Fi — both get addresses on their networks | ☐ |
| 6.1 | All five rows of the step 6 table match | The test record is filled in: disabled port, cash desk port, camera port, rogue DHCP — as expected | ☐ |
| 6.2 | The switch password isn't the factory default | Logging in to the web interface with admin/admin fails |
☐ |
| 6.3 | The test record is saved | The record shows the test date and who ran it | ☐ |
Questions
Is a TP-Link Easy Smart switch enough?
For VLANs and disabling ports — yes. For binding the cash desk and blocking rogue DHCP — usually not: you need JetStream or MikroTik.
Can I enable Port Security on all ports at once?
No. Dozens of devices work through the access point port and the uplink, and with a limit of one MAC, all but the first lose network access. Apply the MAC limit only to ports with a single permanent device — the cash desk, the NVR.
Is MAC binding reliable? MACs can be spoofed.
They can: if an outsider learns the cashier's computer MAC and unplugs it, a laptop with the same MAC will pass the binding. Binding stops casual connections and the "mini PC behind the cabinet"; against a prepared attacker, what helps is a cash desk socket that customers can't reach, and 802.1X.
What is 802.1X, and does an exchange office need it?
802.1X lets a device onto the network only after its login or certificate is verified by a RADIUS server, so MAC spoofing doesn't help. It requires a RADIUS server and setup on every computer. With one or two cash desks, steps 2–3 are usually enough; 802.1X pays off when there are many workstations and sockets.
How is port isolation different from VLANs?
VLANs split devices into groups: the cash desk can't see the cameras. Port isolation works inside a single VLAN: the cameras are on one network, but exchange traffic only with the NVR and the uplink, not with each other (step 4).
Why DHCP Snooping if the router hands out addresses?
Any device on the network can hand out addresses, and computers take an address from whoever answers first. Most often it isn't an attack but a home router someone plugged into a socket by its LAN port — and half the office loses internet. DHCP Snooping lets DHCP replies through only from the router port.
How do I see who's connected to the switch right now?
MikroTik: /interface bridge host print — MAC addresses by port; /ip dhcp-server lease print — who has been assigned addresses. Omada — the Clients section; JetStream without a controller — the MAC address table (MAC Address Table). Compare against the device map from the network guide: track down an unknown MAC by the port it shows up on.
There's a socket in the customer area that's needed once a month. What should I do with it?
Keep its port disabled and enable it only while it's in use (step 2), then disable it again. If the socket is needed often, move its port to the guest network: from there, only the internet is reachable.
The protection disappeared after a power outage — why?
On TP-Link JetStream, changes made with Apply stay in effect until a reboot and are saved only after Save Config. Go through steps 2–5 again and save the configuration, then repeat the step 6 test. MikroTik saves changes immediately.
Does this protect against Wi-Fi connections?
No, these steps cover only wired ports. Separate staff and guest networks keep Wi-Fi away from the cash desk — see Guest Wi-Fi Isolation for a Crypto Exchange Office.
What should I do when replacing the cashier's computer?
Update the MAC in the binding (step 3) and repeat check 2 from step 6.
Note: TP-Link menu paths depend on the model and firmware — check them against your switch's user guide.