andrewstillie
Posts: 54
Joined: Tue Sep 18, 2012 11:26 am

Port Forwarding

Tue Feb 04, 2014 2:54 pm

Hi there,

I am trying to build a PI gadget that has a webserver + mysql database running on it. It will be connected to a home router and remotely accessed (other nodes sending in mysql quiries).

I would like to operate this so that the user does not have to reconfigure there home router port forwarding setting. Is there any way I can do this?

Thanks in advance
Andy

User avatar
topguy
Posts: 5967
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Port Forwarding

Tue Feb 04, 2014 3:32 pm

You can use uPnP to trigger a portforwarding in the router, but not all routers have uPnP support and not all users wants to have it enabled. ( some people even have two routers, ISP-router + wifi-router )

Random perl script for uPnP:
http://www.howtoforge.com/administratin ... e-via-upnp

I havent googled for specific languages, it just was the second example I found. (the first was Java)

The other solution is to make a closed VPN with hamachi or similar solution and have the server and all clients talk to eachother via the VPN.

andrewstillie
Posts: 54
Joined: Tue Sep 18, 2012 11:26 am

Re: Port Forwarding

Wed Feb 05, 2014 9:49 am

Much appreciated - I will do some background reading this evening.

Return to “Networking and servers”