# Group by hosts with MAC

**URL:** <https://community.ipfire.org/t/group-by-hosts-with-mac/7688>\
**Category:** Firewall Rules\
**Created:** [9 April 2022 08:20 UTC](https://community.ipfire.org/t/group-by-hosts-with-mac/7688 "2022-04-09T08:20:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincenzo](https://community.ipfire.org/user_avatar/community.ipfire.org/vincenzo/32/16750_2.png) [@vincenzo](https://community.ipfire.org/u/vincenzo)\
**Post date:** [9 April 2022 08:20 UTC](https://community.ipfire.org/t/group-by-hosts-with-mac/7688/1 "2022-04-09T08:20:24Z")

</div>

Hi all

I was playing with groups…  
I created:

1. a group (in network/host)  
2 some host with ipaddress

and I assigned the host to the group. Then in the source field ,I seleced the group name in Network/Host.  
That works…

but…  
If I change host, with the device MAC (not IP), the same rule DOES NOT work.

do you know why? Is there any setup I have to change?  
thanks  
vincenzo

---

<div class="post-metadata">

**Author:** ![jon](https://community.ipfire.org/user_avatar/community.ipfire.org/jon/32/15363_2.png) [@jon](https://community.ipfire.org/u/jon)\
**Post date:** [9 April 2022 17:51 UTC](https://community.ipfire.org/t/group-by-hosts-with-mac/7688/2 "2022-04-09T17:51:32Z")

</div>

This might help:

[https://wiki.ipfire.org/configuration/firewall/rules#attention](https://wiki.ipfire.org/configuration/firewall/rules#attention)

---

<div class="post-metadata">

**Author:** ![pmueller](https://community.ipfire.org/user_avatar/community.ipfire.org/pmueller/32/9019_2.png) [@pmueller](https://community.ipfire.org/u/pmueller)\
**Post date:** [10 April 2022 16:04 UTC](https://community.ipfire.org/t/group-by-hosts-with-mac/7688/3 "2022-04-10T16:04:48Z")

</div>

Hi,

> [@vincenzo](#):
>
> but…  
> If I change host, with the device MAC (not IP), the same rule DOES NOT work.

if I understood your rule setup correctly, this would mean the same group contains both IP and MAC addresses. I am actually surprised we support configurations like that. 🙂

Do things work well if you create a dedicated group for MAC addresses, clone the firewall rule in question, and set its source to the MAC address group previously created?

Thanks, and best regards,  
Peter Müller

---

<div class="post-metadata">

**Author:** ![vincenzo](https://community.ipfire.org/user_avatar/community.ipfire.org/vincenzo/32/16750_2.png) [@vincenzo](https://community.ipfire.org/u/vincenzo)\
**Post date:** [10 April 2022 21:10 UTC](https://community.ipfire.org/t/group-by-hosts-with-mac/7688/4 "2022-04-10T21:10:04Z")

</div>

Hi Peter

each group has been set using or all IP or all MAC. No mix at all.  
I re-tested:

1. I created a new host named IPAD MAC where I included the Mac addr.  
 ![immagine](https://community.ipfire.org/uploads/default/original/2X/2/2fa5cd958df83ff0e42e6f53b7345854d6cc785b.png)
2. Then I created a new group named Test and assigned the host in point 1  
 ![immagine](https://community.ipfire.org/uploads/default/original/2X/2/2ac3453c7f1a01f0dcf4ea03ddbc395bdf1dc803.png)
3. in the end, I’ve changed the rule, including the group Test in source field  
 ![immagine](https://community.ipfire.org/uploads/default/original/2X/9/9c5c8176ef6d88430c3e51f94d3bdfba074ab6dc.png)

In IPAD, I put [https://192.168.1.115:4443](https://192.168.1.115:4443), but then It does not reach the page.  
I don’t know where to look for…  
Thanks for your support

regards  
vincenzo

---

<div class="post-metadata">

**Author:** ![vincenzo](https://community.ipfire.org/user_avatar/community.ipfire.org/vincenzo/32/16750_2.png) [@vincenzo](https://community.ipfire.org/u/vincenzo)\
**Post date:** [10 April 2022 21:13 UTC](https://community.ipfire.org/t/group-by-hosts-with-mac/7688/5 "2022-04-10T21:13:59Z")

</div>

By the way: I’m using  
 ![immagine](https://community.ipfire.org/uploads/default/original/2X/e/e95d7b4fc00f289c31dff5d99435b0a0b17de4a1.png)  
on RPI 3

ciao  
vincenzo
