EN
  • English
  • Русский
  • ქართულიsoon
  • Українськаsoon
  • Shqipsoon
  • Azərbaycancasoon
  • Türkçesoon
Get in touch
Casinos & gamingOffice network & Wi-Fi

Casino Switch Port Security: Slot Machines and Cashiers

Casino switch port security: lock gaming floor ports against rogue devices — port security, BPDU guard, DHCP snooping, DAI, logging and testing.

Читать на русском →

On this page

On a gaming floor there are network ports everywhere — in slot machine cabinets, under tables, at cashier desks — and vendor technicians, cleaners and security staff can all reach them. After these steps, a foreign device plugged into any floor port gets no access to the CMS network, a rogue switch shuts the port down, rogue DHCP and ARP spoofing don't work, and the person in charge learns about every violation within a minute. Commands are for Cisco Catalyst (IOS); TP-Link JetStream equivalents are in the table in step 3.

Plan

Step What we do Time
1 Build a port map: port → machine 2–4 hours
2 Shut down empty ports and move them to a "parking" VLAN 30 min
3 Set slot ports to access mode with no trunk negotiation 30 min
4 Enable BPDU guard 15 min
5 Bind each port to its slot interface board (port security) 1 hour
6 Enable DHCP snooping and ARP spoofing protection 1 hour
7 Enable storm control 15 min
8 Lock down switch management 30 min
9 Send logs to a server and set up alerts 1 hour
10 Test every control and write down the board replacement procedure 2 hours

What an attacker does with a port on the gaming floor

The attacker doesn't need to understand the slot accounting protocol (between the machine and its interface board it's serial). It's enough to land in the same segment as the CMS servers. Options:

  1. Plugs a laptop or mini PC into a free port → free ports are shut down (step 2).
  2. Plugs a device in instead of the slot's interface board and gets its network → the port only accepts its own board's MAC (step 5).
  3. Negotiates a trunk with the switch (DTP) and gets all VLANs → ports are strictly access, negotiation is off (step 3).
  4. Adds a small switch to connect both the board and their own device → BPDU guard shuts the port down (step 4), port security blocks the second MAC (step 5).
  5. Runs their own DHCP server and hands their gateway to neighboring machines → DHCP snooping (step 6).
  6. Spoofs ARP and intercepts board-to-CMS traffic → Dynamic ARP Inspection (step 6).
  7. Causes a broadcast storm and takes the floor down → storm control (step 7).
  8. Logs into the switch web interface with a password every technician knows → management only from the admin zone (step 8).
  9. Operates while nobody watches the logs → alerts on every violation (step 9).

The gaming floor network as a whole — zones and the firewall — is covered in the Casino network in a hotel guide; this one is about ports.

Step 1. Build a port map: port → machine

How to do it.

  1. On each floor switch:
show interfaces status
show mac address-table dynamic
show cdp neighbors
  1. Match MACs to machines (the interface board's MAC is on its label or in the CMS) and fill in the table:
Switch Port Machine / device MAC VLAN
SW-FLOOR-1 Gi1/0/5 slot #105, board <model> aaaa.bbbb.0105 110
SW-FLOOR-1 Gi1/0/41 — — 999
  1. Set a description on every port:
interface GigabitEthernet1/0/5
 description SLOT-105

Done when: every port with a link has a machine in the table and a description.

Step 2. Shut down empty ports and move them to a "parking" VLAN

vlan 999
 name PARKING
interface range GigabitEthernet1/0/41 - 46
 description UNUSED
 switchport mode access
 switchport access vlan 999
 shutdown

VLAN 999 isn't routed anywhere. Even if someone enables the port, it lands in an empty network.

Test: a laptop in a shut-down port — no link.

Done when: every port without a machine shows disabled in show interfaces status.

Step 3. Set slot ports to access mode with no trunk negotiation

vlan 110
 name SLOTS
interface range GigabitEthernet1/0/1 - 40
 switchport mode access
 switchport access vlan 110
 switchport nonegotiate
 spanning-tree portfast
 no cdp enable
 no lldp transmit
 no lldp receive

switchport nonegotiate turns off DTP, so nobody can negotiate a trunk through the port. Slot ports don't need CDP and LLDP — they only tell whoever plugs in about the switch.

TP-Link JetStream equivalents (names depend on the model and firmware):

Control Cisco TP-Link JetStream
Strict access port switchport mode access, nonegotiate VLAN → 802.1Q VLAN: port Untagged in VLAN 110 only, PVID 110
BPDU guard spanning-tree bpduguard enable Spanning Tree → Port Config: BPDU Protect
Port security switchport port-security Security → Port Security / MAC VLAN Security
DHCP snooping ip dhcp snooping Network Security → DHCP Snooping / DHCP Filter
ARP protection ip arp inspection Network Security → ARP Detection / IP-MAC Binding
Storm control storm-control QoS → Storm Control

Test: show interfaces Gi1/0/5 switchport — Administrative Mode: static access, Negotiation of Trunking: Off.

Done when: trunk negotiation is off on all slot ports.

Step 4. Enable BPDU guard

interface range GigabitEthernet1/0/1 - 40
 spanning-tree bpduguard enable

If someone plugs a switch into the port, it sends BPDUs and the port goes err-disabled. Don't enable automatic port recovery (errdisable recovery cause bpduguard): let a technician come and investigate.

Test: a small managed switch in the port → show interfaces status err-disabled lists the port.

Done when: the test produced err-disabled and a log event.

Step 5. Bind each port to its slot interface board (port security)

interface range GigabitEthernet1/0/1 - 40
 switchport port-security
 switchport port-security maximum 1
 switchport port-security mac-address sticky
 switchport port-security violation restrict
end
copy running-config startup-config
  • sticky learns the board's MAC on first connection; copy running-config startup-config is mandatory, otherwise the bindings disappear after a reboot.
  • violation restrict drops foreign frames, keeps the port up and writes an event to the log. shutdown is stricter, but a single board failure will take the machine down until a technician arrives.
  • Compare the learned MACs with the step 1 map: show port-security address.

MAB instead of sticky. If the casino has RADIUS (Cisco ISE, FreeRADIUS), MAC Authentication Bypass (MAB) gives you a central list of allowed boards instead of sticky on every switch. MACs can be spoofed, so MAB works together with the other controls, not instead of them.

Test: a laptop in place of the board → show port-security interface Gi1/0/5 — Security Violation Count goes up, the laptop gets no address.

Done when: all learned MACs match the map and the test produced a violation.

Step 6. Enable DHCP snooping and ARP spoofing protection

If the boards get addresses via DHCP:

ip dhcp snooping
ip dhcp snooping vlan 110
no ip dhcp snooping information option
ip arp inspection vlan 110
interface range GigabitEthernet1/0/1 - 40
 ip dhcp snooping limit rate 10
interface GigabitEthernet1/0/48
 description UPLINK
 switchport mode trunk
 switchport trunk allowed vlan 110
 ip dhcp snooping trust
 ip arp inspection trust

DAI checks ARP against the DHCP snooping table (show ip dhcp snooping binding).

If the boards have static addresses, DAI without a list will drop their ARP. You need an ARP ACL built from the step 1 map:

arp access-list SLOTS-STATIC
 permit ip host 10.20.10.105 mac host aaaa.bbbb.0105
 permit ip host 10.20.10.106 mac host aaaa.bbbb.0106
ip arp inspection filter SLOTS-STATIC vlan 110 static
ip arp inspection vlan 110

Enable DAI during a maintenance window and watch show ip arp inspection statistics vlan 110 — the Dropped counter for legitimate machines must stay at zero.

Test: a test DHCP server (dnsmasq on a laptop) in a floor port → neighboring machines don't get an address from it, and the log shows DHCP_SNOOPING. ARP spoofing from a laptop (in a lab) → the log shows SW_DAI.

Done when: both tests produced an event and legitimate machines keep working.

Step 7. Enable storm control

interface range GigabitEthernet1/0/1 - 40
 storm-control broadcast level 1.00
 storm-control multicast level 5.00
 storm-control action trap

1% of link bandwidth for broadcast on a slot port leaves plenty of headroom. action trap writes an event to the log; shutdown is stricter.

Done when: show storm-control broadcast shows the threshold on all slot ports.

Step 8. Lock down switch management

ip access-list standard MGMT-ONLY
 permit 10.20.70.0 0.0.0.255
 deny any log
line vty 0 15
 access-class MGMT-ONLY in
 transport input ssh
line con 0
 exec-timeout 5 0
no ip http server
no ip http secure-server
ip ssh version 2
username <admin_name> privilege 15 algorithm-type scrypt secret <password>
service password-encryption

Every admin has their own account (or RADIUS/TACACS+). The enable password and account passwords don't match the passwords on other switches. Switches live in locked cabinets, not on the floor behind the machines.

Test: ssh to the switch from an office workstation — no response; from the admin zone — login works.

Done when: management is only reachable from the admin zone and the web interface is off.

Step 9. Send logs to a server and set up alerts

How to do it.

  1. On the switches — accurate time and logging to the server:
ntp server 10.20.70.10
clock timezone GET 4 0
service timestamps log datetime msec localtime
logging host 10.20.70.20
logging trap warnings
snmp-server enable traps port-security
  1. On the log server (Ubuntu, VLAN 170) — receive logs and write switches to a separate file. /etc/rsyslog.d/10-switches.conf:
module(load="imudp")
input(type="imudp" port="514")
if $fromhost-ip startswith '10.20.70.' then {
  action(type="omfile" file="/var/log/switches.log")
  stop
}
sudo systemctl restart rsyslog
sudo ufw allow from 10.20.70.0/24 to any port 514 proto udp

The switches' management addresses are in 10.20.70.0/24 (step 8), so filtering by address prefix separates their logs.

  1. Alerts — /usr/local/bin/switch-alert.sh:
#!/bin/bash
BOT="<bot_token>"; CHAT="<chat_id>"
tail -F /var/log/switches.log |
grep --line-buffered -E 'PSECURE_VIOLATION|BPDUGUARD|ERR_DISABLE|DHCP_SNOOPING|SW_DAI|STORM_CONTROL|LOGIN_FAILED' |
while read -r line; do
  curl -s -X POST "https://api.telegram.org/bot$BOT/sendMessage" -d chat_id="$CHAT" --data-urlencode text="FLOOR: $line" >/dev/null
  sleep 3
done

systemd service — /etc/systemd/system/switch-alert.service:

[Unit]
Description=Switch security alerts
After=rsyslog.service

[Service]
ExecStart=/usr/local/bin/switch-alert.sh
Restart=always

[Install]
WantedBy=multi-user.target
sudo chmod 700 /usr/local/bin/switch-alert.sh
sudo systemctl daemon-reload && sudo systemctl enable --now switch-alert
  1. Investigate every alert: which port, which machine (step 1 map), who was nearby — camera footage (casino video surveillance).

Test: any violation from steps 4–6 produces a Telegram message within a minute.

Done when: alerts arrive and every alert from the last month has an investigation record.

Step 10. Test every control and write down the board replacement procedure

Testing — at an agreed time, with a casino technician and a surveillance department representative:

# Action Expected
1 Laptop in a shut-down port no link
2 Laptop in place of a slot board port security violation, no address, alert
3 Small switch in a port port err-disabled, alert
4 Test DHCP server in a port neighbors get no address, alert
5 Laptop tries to negotiate a trunk (in a lab) trunk doesn't come up
6 ssh to the switch from the office no response
7 After all tests all floor machines work, the CMS sees them

Board replacement procedure (print it for the technicians):

  1. The technician tells the person in charge: machine, port, reason.
  2. After the new board is installed, the admin clears the binding:
clear port-security sticky interface GigabitEthernet1/0/5
copy running-config startup-config
  1. The new MAC goes into the port map (step 1), the event goes into the work log.
  2. Only the admin brings an err-disabled port back up, after investigating: shutdown → no shutdown.

Done when: all seven rows matched and the replacement procedure has been handed to the technicians against signature.

Checklist

# What to check How to verify ☐
1.1 Every port with a link has a machine in the map the number of connected ports in show interfaces status equals the number of map rows for that switch ☐
1.2 MACs in the map are real show mac address-table interface Gi1/0/5 (spot-check 10 ports) — the MAC matches the map and the board label or CMS data ☐
1.3 Ports are labeled show interfaces description — no port in the up state has an empty description ☐
2.1 Empty ports are shut down and parked show interfaces status — ports without a machine show disabled, VLAN 999 ☐
2.2 VLAN 999 isn't routed anywhere show ip interface brief — there is no Vlan999 interface; the firewall has no interface in VLAN 999 either ☐
3.1 Slot ports are strictly access show interfaces Gi1/0/5 switchport — Administrative Mode: static access, Negotiation of Trunking: Off ☐
3.2 Trunk only on the uplink show interfaces trunk — only the uplink is listed, allowed VLANs are only the floor and management VLANs ☐
3.3 CDP and LLDP are off on slot ports show running-config interface Gi1/0/5 — contains no cdp enable, no lldp transmit, no lldp receive ☐
4.1 BPDU guard on all slot ports show spanning-tree interface Gi1/0/5 detail — the line Bpdu guard is enabled (spot-check on each switch) ☐
4.2 The port doesn't come back up by itself show errdisable recovery — bpduguard shows Disabled ☐
4.3 The control fires after the small-switch test, show interfaces status err-disabled showed the port with reason bpduguard ☐
5.1 Port security is configured as intended show port-security interface Gi1/0/5 — Port Security = Enabled, Maximum MAC Addresses = 1, Violation Mode = Restrict ☐
5.2 Learned MACs match the map show port-security address — every MAC is in the step 1 map on the same port ☐
5.3 Bindings survive a reboot show startup-config | include sticky — switchport port-security mac-address sticky lines with the boards' MACs ☐
6.1 DHCP snooping works in the floor VLAN show ip dhcp snooping — Switch DHCP snooping is enabled, VLAN 110 is listed, in the interface table the uplink shows yes under Trusted and slot ports show no ☐
6.2 DAI doesn't interfere with legitimate machines during a maintenance window, show ip arp inspection statistics vlan 110 — the Dropped counter doesn't grow while only floor machines are running ☐
6.3 A rogue DHCP server doesn't work dnsmasq on a laptop in a floor port — neighboring machines get no address from it, the log shows DHCP_SNOOPING ☐
7.1 Threshold set on all slot ports show storm-control broadcast — ports 1–40 show Upper 1.00% ☐
7.2 The threshold doesn't interfere with operations same output: the Current column for slot ports in normal operation is far below the threshold ☐
8.1 Management is SSH-only from the admin zone show running-config | section line vty — access-class MGMT-ONLY in, transport input ssh; show running-config | include ip http — both no ip http ☐
8.2 The switch doesn't respond from the office ssh <switch_address> from an office workstation — timeout; from the admin zone — login works ☐
8.3 Accounts are personal, cabinets are locked show running-config | include username — only personal names; walk the floor — every switch is in a locked cabinet ☐
9.1 Time is accurate show ntp status — Clock is synchronized ☐
9.2 Logs reach the server show logging — Logging to 10.20.70.20; on the server tail /var/log/switches.log — lines with the current time ☐
9.3 Alerts work and get investigated systemctl status switch-alert — active (running); every alert from the last month has an investigation record ☐
10.1 All step 10 tests passed a dated record: all seven table rows matched, after the tests all machines are visible in the CMS ☐
10.2 Technicians know the board replacement procedure the procedure was handed out against signature; ask a technician what to do when replacing a board — the right answer: "tell the person in charge, the admin clears the binding" ☐
10.3 The map is up to date after replacements the new MAC of the most recently replaced board is in the map and in show port-security address ☐

Questions

Will this slow down the slot machines?

No: the switch handles these features in hardware. There's one risk — DAI with static addresses and no ARP ACL; that's why step 6 is done during a maintenance window with a counter check.

For a small floor — managed TP-Link JetStream switches with the required features. Check the model's spec sheet against the step 3 table: Port Security, BPDU Protect, DHCP Snooping, ARP Detection, Storm Control.

Can we get by with unmanaged switches?

No. An unmanaged switch can't do anything in this guide: it can't shut a port down, bind a MAC, drop rogue DHCP or send an event to a log. A gaming floor needs managed switches.

How is sticky different from regular port security?

Regular (dynamic) learned addresses live only in memory and are lost on reboot — after which the port learns the first MAC that connects, including a foreign one. Sticky writes the addresses into the running configuration, and after copy running-config startup-config they are saved (step 5).

Which violation mode: protect, restrict or shutdown?

protect silently drops foreign frames — no log entry and no counter, so you won't see the violation. restrict also drops them, but writes an event to the log and increments the violation counter. shutdown puts the port into err-disabled and takes the machine down until an admin arrives. For a gaming floor, restrict makes sense (step 5).

Why not 802.1X?

802.1X requires the device itself to present credentials to the switch. Check the interface board's documentation to see whether it can. If not — MAC authentication via RADIUS (MAB, step 5) together with the other controls.

How is DAI different from DHCP snooping and IP Source Guard?

DHCP snooping drops DHCP server replies on untrusted ports and builds a "port — MAC — IP" table. DAI uses that table (or an ARP ACL) to check ARP and stop devices from impersonating someone else's address. IP Source Guard (ip verify source on the port) uses the same table to drop IP packets with a foreign source address; with static addresses it also needs static bindings.

Does port security help if someone spoofs the board's MAC?

Not fully: the MAC can be copied from the label, and such a device will pass port security. That's why port protection is one control among several: the firewall only allows accounting protocols from the floor VLAN to the CMS (casino network), DAI prevents spoofing other addresses, and slot cabinets are in camera view.

A slot port went err-disabled overnight. What do we do?

Don't bring it up right away. Check the reason in show interfaces status err-disabled (Reason column), find the machine in the step 1 map, check the log and camera footage for that machine (step 9). The admin brings the port up after investigating: shutdown, then no shutdown (step 10).

How can we tell if something has already been plugged into floor ports?

show port-security — a non-zero SecurityViolation counter on ports; show interfaces status err-disabled — shut-down ports; show mac address-table — MACs that aren't in the step 1 map. If logs already go to the server (step 9), search /var/log/switches.log for PSECURE_VIOLATION, BPDUGUARD, DHCP_SNOOPING events and match the timestamps with camera footage.

Should cashier and terminal ports be locked down the same way?

Yes: the same access mode, BPDU guard and port security, just in their own VLAN (cashier — VLAN 130 per the addressing plan in the casino network guide, step 2). Camera ports too — see the video surveillance guide, step 3.


Note: TP-Link feature names depend on the model.

Sources

  1. Cisco — Configuring DHCP Snooping / Dynamic ARP Inspection (Catalyst)
  2. Security Today — Big Business (VLANs and VLAN hopping in casinos)
↑