Limit ssh access by MAC-address using iptables

This is a simple iptables rule to allow ssh access to a specific MAC-address

iptables -A INPUT -p tcp --destination-port 22 -m mac --mac-source XX:XX:XX:XX:XX:XX -j ACCEPT

This is a nice rule to allow only your laptop ssh access on your servers no matter what IP-address you may have while you are on the road. You do offcourse need to replace XX:XX:XX:XX:XX:XX with your actual MAC-address.

After allowing this rule you should keep an eye on your laptop :)