Port forwarding and UPnP: Adding a rule after UPnP rules

Started by netdan, August 05, 2017, 01:32:17 AM

Previous topic - Next topic
Hi folks!

The os-upnp package is really useful to me. However, I want to add a Port Forwarding rule which has to be loaded after all the other Port Forwarding rules and even after the UPnP rules have been processed. Is there a way I can accomplish this?

What I want to achieve is to redirect all incoming traffic to WAN that don't have a corresponding Port Forwarding rule and that haven't been registered in UPnP (the miniupnpd anchor in pf) to a specific host. In some routers this is called a "DMZ host" or a "sinkhole". I can add a rule at the bottom of the Port Forwarding ruleset that does all I want, except that it breaks UPnP which is normally loaded after all the Port Forwarding rules.

I'm hoping that someone out there can help me in this endeavor!