Ebtables to stop DHCP and ARP



Here is my setup:

Private IP Address Network <==> Linux Ethernet Bridge <==> Public IP
Address Network

The bridge is there so that we can set static public IP Addresses
behind the Private IP Gateway (I have no control over this device).

This setup works great in one of our other locations, but here we have
a problem. The Gateway for the Public IP Address Network thinks that
it has ALL PRIVATE IP ADDRESSES. So when a new device turns on in the
Private network and does a DHCP Discover, Offer, Request, and ACK, it
then does a Gratuitous ARP Broadcast asking who has the address it's
received, then the Public IP Gateway responds with ARP saying that the
IP address is at its MAC address. So I figure, the best way to stop
this is to use ebtables to block the DHCP and ARP from the private
addresses. Here are the commands that I am using, but aren't working:

ebtables -P FORWARD DROP
ebtables -P INPUT DROP
ebtables -P OUTPUT DROP
ebtables -A FORWARD -p IPv4 -j ACCEPT
ebtables -A FORWARD -p ARP -j ACCEPT
ebtables -A INPUT -p IPv4 -j ACCEPT
ebtables -A INPUT -p ARP -j ACCEPT
ebtables -A OUTPUT -p IPv4 -j ACCEPT
ebtables -A OUTPUT -p ARP -j ACCEPT
ebtables -A INPUT -i $PRIVATE_NET -d ff:ff:ff:ff:ff:ff/
ff:ff:ff:ff:ff:ff -p IPv4 --ip-prot udp --ip-dport 67:68 -j DROP
ebtables -A INPUT -i $PUBLIC_NET -p arp --arp-ip-src 192.168.0.0/16 -j
DROP

Any suggestions on how to block this properly in ebtables or
suggestions of any settings I may be missing?

.



Relevant Pages

  • Re: Ebtables to stop DHCP and ARP
    ... behind the Private IP Gateway. ... then the Public IP Gateway responds with ARP saying that the ... this is to use ebtables to block the DHCP and ARP from the private ...
    (comp.os.linux.networking)
  • Re: Ebtables to stop DHCP and ARP
    ... I ended up moving the packets that I want blocked to the FORWARD chain ... # Clear ebtables ... ebtables -A INPUT -p ARP -j ACCEPT ... # Drop private IP ARP traffic and any Private responses from the ...
    (comp.os.linux.networking)