Virtualization · Virtual Networking
MAC Spoofing
Cheat sheet · https://pcornel.dk/topic.php?topic=3531
Answer
MAC Spoofing policy controls whether a guest may transmit frames whose source MAC differs from the MAC identity normally assigned or learned for its virtual NIC.
Remember
- MAC spoofing is primarily a transmit/source-MAC admission concern; receive behavior may be controlled separately.
- Disabling anti-spoof controls can be required for some virtual appliances but increases L2 abuse risk.
- A changed guest MAC can also conflict with upstream port-security or duplicate-MAC checks.
- Permit only the scope required by the workload and verify actual source frames.
First checks
esxcli network vswitch standard policy security get -v vSwitch0— MAC changes / forged transmitsGet-VMNetworkAdapter <vm> | fl MacAddressSpoofing— Hyper-V settingcat /etc/pve/firewall/<vmid>.fw— Proxmox macfilter
Verify in this order
guest frame source MAC → policy check → forward/drop
Where it usually breaks
First mismatch in guest NIC → virtual switch/bridge → VLAN/port group/security policy → physical uplink → routed path → peer/workload; preserve identity/native error/pre-state before mutation.
Virtual Networking → MAC Spoofing reference map
| Boundary | Meaning | Evidence limit |
|---|---|---|
| Assigned MAC | Normal vNIC identity | Baseline |
| Alternate source | Guest-generated MAC | Workload need |
| Hypervisor policy | Allow/drop | Local boundary |
| Upstream | Learn/security | External boundary |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3531