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

General support for the Pi-Star System
Post Reply
w2pw
Posts: 1
Joined: Sat Jun 23, 2018 1:39 am

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

Post 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
User avatar
MW0MWZ
Site Admin
Posts: 1505
Joined: Wed Apr 04, 2018 9:15 pm
Location: Wales, UK
Contact:

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

Post 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...
Andy

73 de MW0MWZ
http://pistar.uk
User avatar
G8SEZ
Posts: 556
Joined: Fri Apr 13, 2018 8:26 pm

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

Post 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.
--

Brian G8SEZ
Post Reply