Yes, Ricky pointed out.
You can either use:
1. Proxy
or
2. Pure iptables to filter out.
If, ur filtering out different networks according to their network segments, i.e.:
10.0.0.x
10.0.1.x
well it's still possible
If, ur serious about iptable to help u, u can dig here:
linuxguruz.com/iptables/