Here is some basic iptable rules. Thanks goes to the cloud support team at Rackspace.
This rule appends the rule. This particular rule opens inbound port 5432 to the ipaddress 126.96.36.199
iptables -A RH-Firewall-1-INPUT -p tcp -s 188.8.131.52 --dport 5432 -j ACCEPT
This rule inserts the rule at the start of the chain.
iptables -I RH-Firewall-INPUT -s 184.108.40.206 -p tcp -m tcp --dport 5432 -j ACCEPT
After adding rules you need to issue this command to save the rules.
service iptables save
After saving you need to issue the restart command
service iptables restart
If you want to see the available chains in your firewall use this command: