ARP Requests/Replies
Hi Everyone,
I'm trying to set up ebtables on my Xen host. What I'm trying to do, is make sure that each guest can only access the bridge on the xen host using the "legal" mac address assigned to it.
The 2 rules I'm using are this:
ebtables -I FORWARD -d $legal_mac_of_guest -o $vif_of_guest -j ACCPET ebtables -I FORWARD -s $legal_mac_of_guest -i $vif_of_guest -j ACCPET
While the above 2 rules do allow normal IP traffic, they seem to block ARP requests/replies working properly. So any machine on the network that doesn't know where to find the IP address of the guest (and has to send a who-has ARP request), they can't communicate with the respective guest.
Can someone please suggest some rules that I need to add to make ARP Requests/Replies work?
Many Thanks
Hello,
Quoted 9 lines · Jonathan Tripathy
I'm trying to set up ebtables on my Xen host. What I'm trying to do, is make sure that each guest can only access the bridge on the xen host using the "legal" mac address assigned to it.
The 2 rules I'm using are this:
ebtables -I FORWARD -d $legal_mac_of_guest -o $vif_of_guest -j ACCPET ebtables -I FORWARD -s $legal_mac_of_guest -i $vif_of_guest -j ACCPET
Note : s/ACCPET/ACCEPT/
Quoted 2 lines
While the above 2 rules do allow normal IP traffic, they seem to block ARP requests/replies working properly.
By allowing only the unicast host address as a destination, you block any broadcast and multicast traffic. ARP requests use broadcast, IPv6 neighbour discovery uses multicast. Note that IP broadcast and multicast traffic is also blocked.
You must also allow broadcast/multicast addresses as a destination :
ebtables -I FORWARD -d multicast -o $vif_of_guest -j ACCEPT
Quoted 24 lines · Pascal Hambourg
Hello,
Quoted 9 lines · Jonathan Tripathy
I'm trying to set up ebtables on my Xen host. What I'm trying to do, is make sure that each guest can only access the bridge on the xen host using the "legal" mac address assigned to it.
The 2 rules I'm using are this:
ebtables -I FORWARD -d $legal_mac_of_guest -o $vif_of_guest -j ACCPET ebtables -I FORWARD -s $legal_mac_of_guest -i $vif_of_guest -j ACCPET
Note : s/ACCPET/ACCEPT/
Quoted 3 lines
While the above 2 rules do allow normal IP traffic, they seem to block ARP requests/replies working properly.
By allowing only the unicast host address as a destination, you block any broadcast and multicast traffic. ARP requests use broadcast, IPv6 neighbour discovery uses multicast. Note that IP broadcast and multicast traffic is also blocked.
Quoted 8 lines
You must also allow broadcast/multicast addresses as a destination :
ebtables -I FORWARD -d multicast -o $vif_of_guest -j ACCEPT --
To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Thanks for the reply. What I ended up doing was this:
ebtables -I FORWARD -p ARP -o $vif_of_guest -j ACCPET
The ARP-Reply (is-at) frame seems to have the source field set properly, so no new rule was required to allow arp replies from the respective guest.
Think that's safe enough?
Thanks
Quoted 22 lines · Jonathan Tripathy
Quoted 13 lines
Quoted 5 lines
I'm trying to set up ebtables on my Xen host. What I'm trying to do, is make sure that each guest can only access the bridge on the xen host using the "legal" mac address assigned to it.
Quoted 8 lines
The 2 rules I'm using are this:
ebtables -I FORWARD -d $legal_mac_of_guest -o $vif_of_guest -j ACCPET ebtables -I FORWARD -s $legal_mac_of_guest -i $vif_of_guest -j ACCPET
While the above 2 rules do allow normal IP traffic, they seem to block ARP requests/replies working properly.
Quoted 8 lines
By allowing only the unicast host address as a destination, you block any broadcast and multicast traffic. ARP requests use broadcast, IPv6 neighbour discovery uses multicast. Note that IP broadcast and multicast traffic is also blocked.
You must also allow broadcast/multicast addresses as a destination :
ebtables -I FORWARD -d multicast -o $vif_of_guest -j ACCEPT
Quoted 8 lines
Thanks for the reply. What I ended up doing was this:
ebtables -I FORWARD -p ARP -o $vif_of_guest -j ACCPET
The ARP-Reply (is-at) frame seems to have the source field set properly, so no new rule was required to allow arp replies from the respective guest.
Think that's safe enough?
Be aware that it solves the problem only for ARP, but not for the other protocols that may use broadcast or multicast.