I use a script like this:
Code:
sudo /sbin/iptables -A INPUT -p tcp -m tcp --destination-port 6881:6889 -j ACCEPT
It opens the range of tcp ports from 6881-6889, but you could leave out the :6889 part if you only want to open 6881.
Not to be confusing, but on Red Hat you might want to change INPUT above to RH-Firewall-1-INPUT if you have that chain (run
Code:
sudo /sbin/iptables --list
to see if you do).
Someone put this useful tutorial in the LinuxQuestions wiki:
basic firewall configuration