Hi,
There are loads of instructions on how to use the iptables.
You should find most of the information in this Linux man page: https://linux.die.net/man/8/iptables
As I understood, you want to keep the limit of 6 connected devices from your home location? In this case, you would need to make a script that would count how many connected addresses there are and on the 6th to stop the incrementation. This will be hard, as you will need to find a way to identify when the device connects and what is the device, so I guess you will also need to check with iptables rules that you've created.
Example for accepting one MAC address and dropping everything else would look like this:
-A FORWARD -i eth1.10 -o eth0 -j DROP
-A FORWARD -i eth1.10 -p tcp -m tcp --dport 80 -m mac --mac-source 00:60:DD:44:85:43 -j ACCEPT