Using my home IP address from abroad

Hi, I was wondering if it possible to use an Arduino plugged into my home router so that I can use my PC abroad as though it were connected to my router using my router's home IP address.

I have found videos that allow me to set up my router to access it remotely , no Arduino required, but that just accesses my router. Not use it as though I was in my home.

I will be grateful for any help.

Roy

  1. Which Arduino?
  2. You aren't clear, do you want to access the Arduino or the PC?

You need to configure the router so that it allows external access to a device on your home network (using the local IP address). That might allow hackers to get into your home network, so it is a dangerous operation.

Check out, "port forwarding",

  • either set up a VPN connection to your home network / router
  • or gather the public WAN IP of your router (e.g. with a dyndns service) and use a port forwarding on the router to the "Arduino". In this case your Arduino will be exposed to the internet. Think about it.

This is not something you either could or should use an Arduino for.

But it can be done. As others have mentioned, creating your own VPN (Virtual Private Network) is one way. Port Forwarding is another, but that's risky from a security point if view.

There are many software products that enable you to do this, but most are not free:

https://www.g2.com/categories/remote-desktop

They often involve having a piece of software installed on your laptop and on your remote pc. Both devices then open a secure connection to a central server belonging to the software provider. Through these connections you can access your pc. Maintaining those central servers costs money, which is why the software is generally not free: you are subscribing to a service.

It is nerarly trivial to configure virtually any router to allow SAFE remote access to any device on your network using port forwarding. Trying to accomplish the same thing using an Arduino would take a HUGE amount of work, and probably would not even work that well when you were done. Honestly, it is a ridiculous solution to the problem as stated.

Its not a good idea to expose the arduino - or anything for that matter - to the internet with a port forward. You're asking for trouble.

Better solution is a raspberry pi w/ Wireguard vpn. It's an inexpensive, reliable, fast and safe way to access anything on your home network through the internet. PiVPN makes it easy to install Wireguard on an RPi. I've been using it for a couple years now. Works great.

1 Like

Look UPNP (TinyUPnP) https://www.arduino.cc/reference/en/libraries/tinyupnp/
But you router UPNP must be enabled.

this also maybe interesting https://husarnet.com/docs/begin-esp32-platformio

:confused:

These seem to be completely incompatible positions. Some elaboration by each poster would be appreciated. (To keep it simpler, please focus on exposing an Arduino via port forwarding, not "any device".)

I disagree. Forget using Arduino for this, it's a cr@p idea.

@RayLivingston @drew-s please explain further how this can/can't be safely done with any device.

(No offence @DaveEvans !)

I'm not advocating either position, so I'm not sure how you can disagree with me.

I'd just like the two posters to justify their positions, and to keep the discussion simple, use a port forwarded Arduino as an example. By that I mean:
Arduino<-->router<-->internet

i face the same issue time ago, the easiest way its to create a webserver and then allow people to get in vía web services as Ngrok (for example). Its not good idea use port forwarding because you can get hacked pretty easy. If you want to send data vía internet and read it in other place just use a server like firebase.

I think this means "safe for your network", as in "you can allow access to your arduino via PAT without endangering other hosts on your network.

It is not a good idea to expose the Arduino...or anything...to the internet with a port forward.

Whereas this is more a statement of "it is not safe to exposes ANY individual device on your home network to external traffic unless you are very sure that that particular device is secured against attack." With arduino-like devices, that's nearly impossible.

Let's focus on the OPs actual question, which I've quoted above. He did not ask to access "ANY device". He asked how to access his PC. ANY solution, even a bad one, will be more secure (actually, less INsecure) than something a hobbyist hacks together using an Arduino.

Now, he doesn't indicate WHAT he wants to do once he has acsess. Perhaps simple ssh access would do. Perhaps not. We don't know. But even that is unlikely to ever work right based on a home-brew Arduino hack. And, HOW will he access the Arduino? It STILL needs an Internet connection, unless he has his own private satellite. So, I don't see how ANY Arduino solves his basic problem. He will HAVE to have some means of knowing, from another country, what IP adderess he needs to access. That IP address will almost certainly be his routers IP address, which means unless he has a static IP, it can change without notice.. He will also HAVE to have some means of "tunneling" through his router, to access his PC. He does not seem to understand any of this.

There are plenty of commercial and shareware solutions to these problems. Remote access is done millions of times a day, and has been for decades. "Rolling your own" seems to me completely ridiculous, and doomed to failure.

Its probably not worth continuing this discussion until roypost let's us know what he thinks of the thoughts expressed so far and/or helps us better understand what he's trying to do

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.