1

i have a server with 5 nics connected to a switch, and running GNS3 (cisco router emulator).

I need to block, in the server, the packets originated by the nics at layer 2 level (the nics are not configured with ip) so i have to block with ip tables, the outgoing traffic in every nic with its own mac address as source.

i have tried some commands like this but it does not work iptables -I "CHAIN-NAME" -m mac --mac-source "MAC-ADDRESS" -j "ACTION"

I'm using DEBIAN 7

Bartoluz
  • 11
  • 1
  • 2
    What does "not work" mean, it gave you errors, or just didn't stop the traffic? Also why are you trying to stop layer 2 traffic with a layer 3 firewall? – NickW May 14 '13 at 15:47

1 Answers1

2

You need to look into ebtables, as iptables is a layer 3 firewall/filter.

NickW
  • 10,183
  • 1
  • 18
  • 26