Answer the question
In order to leave comments, you need to log in
How to give access to the server by MAC address?
Task: There is a server on linux. How can I configure it so that only certain MAC addresses can connect to it, and the rest are immediately forwarded.
If you can somehow organize access from a specific list of devices - write, I will be glad.
PS I know that the MAC address can be changed, I don't need to talk about it.
Answer the question
In order to leave comments, you need to log in
#1227 - Access denied. You need SUPER privileges for this operation
Through iptables:
iptables -t nat -A PREROUTING -m mac --mac-source xx-xx-xx-xx-xx-xx -j ACCEPT (Host A)
iptables -t nat -A PREROUTING -m mac --mac-source xx-xx-xx-xx-xx-xx -j ACCEPT (Host B)
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 127.0.0.1:8080
If you can somehow organize access from a specific list of devicesKeys, VPN or VLAN (on the switch)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question