Iptables - Block VPS to acess Internet

Hi, everyone
I have one vps server cloud, In this server i have my applicattion running.
For security i need block all output internet and allow only the ip by iptables.
In iptables i think that possible blocking OUTPUT traffic, but i don’t have idea how do.

Same can help me,how i do it ?



To block all the outgoing internet traffic on eth1 NIC use:

iptables -I OUTPUT -o eth1 -j DROP

Allow then If you just want to allow only one IP address use:

iptables -A INPUT -s -j ACCEPT
iptables -A OUTPUT -d -j ACCEPT