elwasso
Hello,
I'm not a network specialist, and i'm struggling with a problem since more than 2 years, now it's getting worse.
I built a project with a Raspberry pi, and i need to access it from outside my wifi.
Long story short, port forwarding, DDNS, etc. all done, the only issue, is that sometimes, my router gets an IP in the local range (172.xxx).
When this happens, i can't access my router from outside, since my DDNS name be pointing to the IP usually in the range (178.xxx), the same one i find when i type MYIP on google.
i disconnect and reconnect many times, until, one time, i hit the 178.xxx IP, then everything works perfectly.
Why this is happening? is there a workaround? I really appreciate your help.
nuclearcat
real ips are scarce resource, isps often start to giving fake ones. Solution is only by paying ISP to get dedicated one. Wont be very cheap most probably.
elwasso
Ogero as fas as i know don't provide real IP to home users, is there any workaround? anything i can do?
nuclearcat
On business connections(but they are quite expensive) - they provide.
Other solution - buy VPS outside and make tunnel there by openvpn or something.
elwasso
Thank you very much for your quick reply
amkahal
as nuclearcat said, VPS is your solution, but if you aren't familiar with such things, get yourself a cheap VPN account from any provider. i used "hamachi" in the past, don't know if they still have free accounts.
rolf
In such situations, the solution usually involves some kind of tunnel. Your device, which is in your private network, will connect to a server on the internet somewhere (with a public IP) and set up a tunnel. What then happens is that anything sent to that server on a specific port number will be forwarded to your device through that tunnel. Your device will also be accessing the internet through that tunnel, so it will bypass any proxy, caching, censorship, etc.
The downsides of this setup are (as far as I can think)
1. you need a server on a public IP. You can subscribe to a service for that, or set up your own server. You can have a nice VPS for $5-$10/ month, I recommend checking out vultr.com for that. They also have a preconfigured images for OpenVPN.
2. Your device has to be smart enough to detect when the tunnel breaks and re-connect it automatically.
There are different tunnel technologies, the most popular for such a scenario seems to be VPN.
On the other hand, if you are on a desktop machine and have access to a server with sshd running (virtually any linux server) then making an SSH tunnel is a very easy solution, involving a few steps.
I don't know about your situation, but if you have this option, look into setting up an SSH tunnel, it is simpler than VPN. But VPN is better supported and covers more situations, so you might have to go with that in the end.