Page 1 of 1

Adding items to the uPNP (not just turning it on-off)

Posted: Wed May 06, 2020 10:02 pm
by w2pw
Folks,

I have a need to add some services to the uPNP client. I see references to turning it on or off, and somehow I think it MIGHT be related to the firewall, but how do I add a port rule? I have used miniupnp and it's OK, but not always effective on a certain UDP port, but I notice Pi-Star's uPNP is very reliable.

Thank you

-Pres W2PW
w2pw at arrl dot net

Re: Adding items to the uPNP (not just turning it on-off)

Posted: Fri May 08, 2020 7:14 pm
by MW0MWZ
In the system crontab you will find this:

Code: Select all

# m h dom mon dow user	command
*/5 *	* * *	root	/usr/local/sbin/pistar-upnp.service start > /dev/null 2>&1 &
if you look at /usr/local/sbin/pistar-upnp.service you will find the magic you are looking for.

Now - if you modify /usr/local/sbin/pistar-upnp.service, this can be over-written by updates, however if you were to copy that file to another name, and modify crontab to point to the new name, that will not get molested when I send out updates :)

Hope thats what you were looking for...

Re: Adding items to the uPNP (not just turning it on-off)

Posted: Sun Jul 19, 2020 6:00 pm
by G8SEZ
I've been looking at the upnp stuff since the update that wasn't a couple of weeks ago, until reading this thread I had not understood that the daemon is started every 5 minutes, I assume that having multiple PiStars on the same router with upnp enabled is not problematic?

I see that there is another suggestion here:

http://www.vk3erw.com/index.php/18-amat ... forwarding

which suggests using a duration to force a maximum of 10 minutes assuming that the router supports it.

I'm currently doing a bit of experimentation to try and make this all a bit clearer by improving the descriptions of connections by making them tied to the hostname.