iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
This will open port 8080, but only until the next start of the iptables service or reboot of the server which restarts the service. To manually restart the service:
service iptables restart
Any changes to iptables entries that were not saved or configured by editing the iptables file will be lost at restart. To save the current configuration:
service iptables save
Another useful command is to turn off all of the iptables rules without losing those rules. This can be accomplished by flushing iptables:
iptables -F
This will effectively turn off the firewall until the next restart of iptables. This can be very useful for debugging connectivity issues.