Previously I asked how to block all traffic except for specific IPs however that wasn't enough. I need to block all outbound/inbound except for my IPs. I don't want to be able to ping/connect to any IP not listed.
This is what I used before
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -s 1.1.1.1 -j ACCEPT
iptables -A INPUT -j DROP # or REJECT
service iptables save
service iptables restart
How can I stop all the outbound traffic except for 1.1.1.1 also?