if what you want is to make it so that the box only has access to a certain subnet then you want to use the OUTPUT chain, not the INPUT chain... example:
Code:
iptables -P OUTPUT DROP
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
iptables -A OUTPUT -d 192.168.1.0/24 -m state --state NEW -j ACCEPT
in the above example, the box would only be allowed to make connections to subnet 192.168.1.0/24...
you could also use a simpler way which doesn't use packet state filtering:
Code:
iptables -P OUTPUT DROP
iptables -A OUTPUT -d 192.168.1.0/24 -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT