Making a home server reachable (IPv4, IPv6, DS-Lite)

3.5k views Asked by At

I am planning to ship a "home server" type device to customers, that communicates with their (Android or iPhone) smart phone. The problem is that, depending on their internet service provider, the customer has no outside-reachable IPv4 address (DS-lite tunneling), so the smart phone can't just use an IPv4 DNS record to find the server.

Alternatives I can think of:

  • Make the server use an IPv6 DynDNS service, and make IPv6 take preference over IPv4 on the smart phone. Since the solution should work without the customer having to sign up for a DynDNS service, I have not found any service that allows me to do that.

  • Set up my own "directory server", such that the home server registers it's serial number in intervals - so similar like DynDNS, but on the application layer via HTTPS. A client could then simply enter the serial number into the app to find the server. Due to authentication/encryption requirements, this solution is harder to implement than I like.

Any other ideas on how to make a home server reachable? I would really like to avoid running my own "cloud service". Some type of peer to peer network discovery, perhaps?

[UPDATE:] This is what I am essentially looking for:

Home server                            Relay         DynDNS        Client
|                                      |             |             |
|-------- open tunnel to port 80 ----->|             |             |
|<-success, listening on 192.0.2.1:80 -|             |             |
|                                      |             |             |
|----- Register "my.ddns.net" ---------------------->|             |
|<------------ "my.ddns.net" is now 192.0.2.1 -------|             |
|                                      |             |             |
|                                      |<- GET http://my.ddns.net -|
|<------- GET http://my.ddns.net   ----|             |             |
|--- HTTP response ------------------->|             |             |
|                                      |----- HTTP response ------>|
2

There are 2 answers

0
knipknap On

Thanks to the other responses, I had the starting points to find some existing solutions: ngrok and localtunnel solve the problem by mapping a dedicated subdomain to each Home Server, and dispatching requests based on HTTP(S) GET requests.

The latter is an open source project, and the server, as well as a javascript client are on Github.

3
Sander Steffann On

Making connection from the internet to a server in a home is difficult. IPv6 is not available everywhere yet and with IPv4 you don't always have a public address available (with multiple NAT layers or DS-Lite).

The only reliable solution today is to have a publicly reachable server as rendezvous point and let the home box maintain a permanent collection to that server. Mobile devices (which might be behind NAT as well) can then reach the home box through the server or set up STUN/TURN style connectivity.