Read the statement by Michael Teeuw here.
How connect with ext. Ip
-
@fischi87 Right. According to the Github page for MagicMirror2, you can control which IP addresses the mirror will authorize (the Whitelist). What’s actually happening is that when some computer makes an attempt to connect to the web server that the Mirror is running, the MagicMirror2 framework consults the IP Whitelist configuration and determines if the IP address of the computer making the call falls within the settings. If it is, then server will return the MagicMirror2 interface (what you normally see on your mirror). If not, then you get the Unauthorized message. This includes the Raspberry Pi itself, which is why the IP address
127.0.0.1
is included in the Whitelist by default.The default configuration is this:
var config = { ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:172.17.0.1"] };
In order to authorize connections from outside of the mirror itself, you need to add more IP addresses to the Whitelist. The first thing I would try is to add the IP address of your router. So if your router exists at
192.168.1.1
, you would change the Whitelist to read:var config = { ipWhitelist: ["127.0.0.1", "192.168.1.1", "::ffff:127.0.0.1", "::1", "::ffff:172.17.0.1"] };
Substitute the IP address of your router as appropriate. If that doesn’t work, you can just delete everything in between the
[
and]
in the above code and open your Mirror up to any connection. -
Good Morning, thanks for ur example but with the Router ip it dosend work and to give any Connection free it for Me not the right way, so can everybody See my mirror online and this is, i think not so good 😅
-
@fischi87 Not entirely. They still have to get through your router. You should be okay.
First thing to try in my opinion is to make sure you have the whitelist format configured properly. User another computer, phone or whatever and add its IP address to the white list. Use it to connect to the mirror and make sure you can see the interface.
Once you’re sure you can correctly modify the whitelist, add the router’s IP address. Then configure your router to forward a port (any port will do) to the IP address of the mirror. This will vary by router brand, but with a little research you should be able to figure it out.
At that point, use a computer NOT on your network to hit your router’s external ip address at the port you specified. For example, if your router has received an external IP address of 104.236.171.165, you would want to use a computer outside your network and go to http://104.236.171.165:675 (or whatever port you had set up to forward to your mirror).
-
There could be a chance that your system does not allow that feature. Any way, you can refer to this guide (https://routerlogin.mobi/192-168-16-1/) to reset your router settings and change your IP address. That will do the trick too!
-
Does anyone know if IP address depends on my zip code? I think no. I tried to trace zip codes on the Internet, could someone give me advice a postcode finder sites. Though, I think IP address depends on Internet provider. And then my question is if I can change my IP address? Can I ask my provider to change it or should I have to open a new account? Thanks a lot for your help.
-
@ertopps what problem are u having?
some internet providers do not allow incoming requests (I’ve had those)
sometimes the ip address you are provided will change, so you have to monitor for that
there are outside services that provide for name mapping to an IP address,
and they provide api services to call and update the address associated with the name…
I use one of those, dyndns.org