I want to execute a shell script when particular ebtables rules match. The Script should get the MAC address of the client and the interface in which the client is connected. how can I achieve this?.
Asked
Active
Viewed 1,491 times
1 Answers
1
You can't do that directly. One option is to log the packets then you can execute a command from Syslog (with a pipe for example).
Example:
ebtables -A FORWARD -s 00:11:22:33:44:55 --log --log-prefix " EBTABLES "
That rule will match all the packets with the source mac address 00:11:22:33:44:55 and the string EBTABLES should appear in syslog. You should have care with this, because it sould be a little agressive if you have to much traffic.

Diego Woitasen
- 32,892
- 1
- 18
- 20