43. IoT and OT Security – Cameras, Smart Devices, Plant Networks
43.5 Network Segregation – IT / OT Zones, Jump Hosts, firewalld
Flat LAN = camera compromise → billing DB. Blue pattern (Purdue-model idea, simplified for SME):
- IoT VLAN – cameras, MQTT sensors only
- OT VLAN – packing PLC / HMI (if you have a real plant lab later – still isolated)
- IT VLAN – office PCs, Raja's ERP
- Firewall between zones – default deny; allow only listed flows
- Jump host (bastion) for admins – MFA, logging, no direct RDP from internet to HMI
# Amazon Linux lab edge – example allow-list thinking (host-only demo IPs)
sudo yum install firewalld
sudo systemctl enable firewalld
sudo service firewalld start
sudo firewall-cmd --permanent --new-zone=iotlab
sudo firewall-cmd --permanent --zone=iotlab --add-source=192.168.56.50/32
# IoT VM may reach MQTT broker on .40:1883 only (lab); no forward to Metasploitable DB ideas
sudo firewall-cmd --permanent --zone=iotlab --add-rich-rule='rule family="ipv4" destination address="192.168.56.40" port port="1883" protocol="tcp" accept'
sudo firewall-cmd --reload
sudo firewall-cmd --list-all-zones
Ubuntu note: sudo apt install firewalld or use ufw with equal care – sudo service ufw status. Don't invent a second brain with both ufw and firewalld fighting.
| Red team (attacker) does | Blue team (defender) detects / stops |
|---|---|
Lands on camera; scans .0/24 for 445/3306 |
VLAN + firewall inter-zone deny; alert on camera→DB flows |
| Phishes IT user; RDP straight to HMI | Jump host only; no HMI on IT VLAN |
| Brings laptop into OT switch "for Wireshark" | Port security / 802.1X ideas; change control |
Ravindra Bagale's Tip
Students say "VLAN = secure" without any firewall rules. A VLAN without ACLs = a fancy colour on the same flood. Interview: show the zone + one allowed port. Got it?
Ravindra Bagale's Tip – मराठी
Students firewall rules शिवाय "VLAN = secure" म्हणतात. ACL शिवाय VLAN = त्याच flood वर fancy रंग. Interview: zone + एक allowed port दाखवा. समजले का?
Ravindra Bagale's Tip – हिंदी
Students firewall rules के बिना कहते हैं "VLAN = secure". ACL के बिना VLAN = उसी flood पर fancy रंग. Interview: zone + एक allowed port दिखाओ. समझ आया?
Lab
Draw three clouds: IT / IoT / OT for Sahyadri Nashik. List five denied flows (camera→RDS, PLC→internet, laptop→Modbus). Optional: implement one rich rule on OWN .40.