How connect with ext. Ip



  • Hello guys,

    It is possible to connect on my mirror with my Domain? Because of my work im not at Home everyday and i want connect to my mirror page with my on Domain.
    I did already a portforwarting to my mirror page in my Router and in my comfig.js i add the Domain in address: but it dosent work. It is possible?

    Greedings



  • You’d need a ddns service for that. Your “home” IP changes from time to time. A DDNS (“dynamic dns”) routes this dynamically to one fixed address.
    For example you can use no-ip (www.no-ip.com), they have a free service.
    You register, create your own nameofchoice.ddns.net address. Then you need to install a server program to your Raspberry Pi OR use your router, if it supports ddns. You need that because someone needs to tell the no-ip server your current home ip.
    There are a lot of tutorials out there for using no-ip with your raspi or with a supporting router.

    If you have e.g. a FritzBox: these have their own ddns service but I’m not that common with that.

    and in my comfig.js i add the Domain in address
    

    What domain? Of course you need to take care of your IP whitelisting. Note that the IP you want to connect from can also change over time.



  • Hello, i have already a ddns Service and this ddns works and like i wrote and i Add a portforwarting already in my Router but the mirror page say always that this ip dosend allow…

    Is it Right When i Write my Domain in the whitelist?



  • @fischi87 You’ll need to add the domain where your connection is originating in order for the mirror to authorize the connection. Either the IP address range where your company’s internet resides, or just open the mirror to accept all connections.

    Hmm… I wonder if you can just add your router’s IP address to the list? That may be worth a try.



  • @bhepler

    Thanks for ur awnser.
    Can u give Me a example please? I dont understand what u mean.



  • @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.



  • @bhepler

    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).


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.