Re: Ebtables to stop DHCP and ARP
- From: support@xxxxxxxxxxxxxxx
- Date: Tue, 31 Jul 2007 15:16:09 -0000
I ended up moving the packets that I want blocked to the FORWARD chain
so I didn't have to worry about what interface it was coming in (just
in case the ethernet cables are in the wrong plug). And I moved the
rules to block the packets above the rules to allow - I forgot that
order matters with ebtables/iptables. I keep looking at it and
thinking something's wrong, but it works and fixes all the problems
I've been having! Thanks for your help.
# Clear ebtables
ebtables -F
ebtables -X
# Drop everything and build up Input and Output to accept IP and ARP
ebtables -P FORWARD DROP
ebtables -P INPUT DROP
ebtables -P OUTPUT DROP
ebtables -A INPUT -p IPv4 -j ACCEPT
ebtables -A INPUT -p ARP -j ACCEPT
ebtables -A INPUT --log-level info --log-ip --log-prefix EBFW
ebtables -A OUTPUT -p IPv4 -j ACCEPT
ebtables -A OUTPUT -p ARP -j ACCEPT
ebtables -A OUTPUT --log-level info --log-ip --log-arp --log-prefix
EBFW -j DROP
# Drop private IP ARP traffic and any Private responses from the
Public Internet
ebtables -A FORWARD -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 FORWARD -p arp --arp-ip-src 192.168.0.0/16 -j DROP
ebtables -A FORWARD -p arp --arp-ip-dst 192.168.0.0/16 -j DROP
# Let the rest of the Packets through
ebtables -A FORWARD -p IPv4 -j ACCEPT
ebtables -A FORWARD -p ARP -j ACCEPT
.
- Follow-Ups:
- Re: Ebtables to stop DHCP and ARP
- From: Clifford Kite
- Re: Ebtables to stop DHCP and ARP
- References:
- Ebtables to stop DHCP and ARP
- From: support
- Re: Ebtables to stop DHCP and ARP
- From: Clifford Kite
- Re: Ebtables to stop DHCP and ARP
- From: support
- Re: Ebtables to stop DHCP and ARP
- From: Clifford Kite
- Ebtables to stop DHCP and ARP
- Prev by Date: ISC DHCP - Two subnets on one physical interface.
- Next by Date: Re: rehat linux9.0 ppp error messages
- Previous by thread: Re: Ebtables to stop DHCP and ARP
- Next by thread: Re: Ebtables to stop DHCP and ARP
- Index(es):
Relevant Pages
|