IPTABLES to block all outgoing connections except selected networks

view full story

http://unix.stackexchange.com – There is a firewall/gateway machine with eth0 Public and eth1 Private network ( I would like to block all OUTPUT connections for private users (eth1) except couple of networks like:, etc. as they are in our city network. There are a lot of questions here about iptables but I couldn't find a way to resolve this issue. It might also happen that some user, say, would not be restricted to those networks. If I do: IPTABLES -P OUTPUT DROP IPTABLES -A OUTPUT -d -s -j ACCEPT ...that would make me adding rules p (HowTos)