hi
I want allow SSH for a particular MAC address only.
how to do this in iptables
SSH
i think this will work, but i can't test it right now:
Code: Select all
ptables -A INPUT -m mac --mac-source 00:aa:22:33:44:ff -m tcp -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -m tcp -p tcp --dport 22 -j DROP
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
-
- Site Admin
- Posts: 5132
- Joined: Fri May 02, 2003 10:24 am
- Location: Karachi
- Contact:
Re:
Dear lambda,
Salam,
Best Regards.
Salam,
This will work.lambda wrote:i think this will work, but i can't test it right now:Code: Select all
ptables -A INPUT -m mac --mac-source 00:aa:22:33:44:ff -m tcp -p tcp --dport 22 -j ACCEPT iptables -A INPUT -m tcp -p tcp --dport 22 -j DROP
Best Regards.
Farrukh Ahmed