There are probably already scripts that do this out there, but I didn't bother looking.
How it works:
- Create a rule file
- Make sure none of these rules are in the existing ipf rule set
- Apply the generated ruleset (won't overwrite or delete any existing rules)
- Wait until you kill the process or logout if you've backgrounded it, then remove
the new rules you added.