If you enter the command sudo ipfw list
you will see the active commands.
To reload the firewall issue the command sudo ipfw flush
To check to see if you have ipfw
rules, you can always go to the terminal and type in: sudo ipfw list
To delete a rule;-
sudo ipfw delete 7000
(7000) being the rule number you wish to delete.
To add or remove ports listed
add a pot range:-
7000 is just a rule number, you can name the rule any number as long as it doesn't already exist.
The port number range is in the format of 1234-1234
Single port add just 1234
TCP / UDP / GRE add the same rule , different rule number and change the TCP to the required protocol
sudo ipfw add 7000 allow tcp from any to any dst-port "?????-?????"
sudo ipfw add 1234 allow tcp from any to any dst-port "8080"
sudo ipfw add 7000 allow tcp from any to any dst-port portnum