Create chains into table filter and table nat, put the rules for your firewall in the order as you want and use that chains in the configuration file for the ports used by upnpd.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=1857856
Originator: NO
Create chains into table filter and table nat, put the rules for your firewall in the order as you want and use that chains in the configuration file for the ports used by upnpd.