You can use iptables (requires advanced knowledge).

Related article: Isolate Hotspot users so they cannot see other parts of my network or other Hotspot users

You can find more iptables examples on the following pages:

Basics: http://www.howtoforge.com/linux_iptables_sarge

Advanced:
http://iptables-tutorial.frozentux.net/iptables-tutorial.html#HOWARULEISBUILT
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch14_:_Linux_Firewalls_Using_iptables

or do a google search on iptables to find more guides.

Did this answer your question?