MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    How to set ipWhitelist for all device can acess to MagicMirror v2?

    Scheduled Pinned Locked Moved Troubleshooting
    18 Posts 6 Posters 14.3k Views 6 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N Offline
      nobita
      last edited by

      someone help me to set that easy config

      morozgrafixM 1 Reply Last reply Reply Quote 0
      • morozgrafixM Offline
        morozgrafix Moderator @nobita
        last edited by

        @nobita are you looking to open access to MM from all of the devices on your local network? If that’s the case you can add subnet mask of your local network.

        For example if your router gives you IP address of 192.168.1.XXX (last 3 digits aren’t important and used for example only) then you would edit ipWhitelist setting in config.js as follows:

        ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "192.168.1.1/24"],
        

        192.168.1.1/24 is a subnet mask for all 256 IP addresses that your router can give out to devices. (this is the most common scenario and there is a chance that your setup may be different).

        Don’t forget to restart MM app after making this change.

        N Mykle1M 2 Replies Last reply Reply Quote 3
        • N Offline
          nobita @morozgrafix
          last edited by

          @morozgrafix Thank so much for your help again

          1 Reply Last reply Reply Quote 0
          • Mykle1M Offline
            Mykle1 Project Sponsor Module Developer @morozgrafix
            last edited by Jopyth

            @morozgrafix

            So sorry to revisit this problem but I can’t seem to access MM on my local network, too. I did what you suggested and edited the ipWhitelist setting in my config.js file. See below:

            var config = {
            	port: 8080,
            	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "192.168.1.1/24"],
            
            	language: 'en',
            	timeFormat: 12,
            	units: 'imperial',
            

            On my PC (192.168.1.4), I enter the Pi3/MM computers IP address of 192.168.1.15:8080 in a Google Chrome browser window. The browser window reports this:

            This device is not allowed to access your mirror.
            Please check your config.js or config.js.sample to change this.

            Any help would be greatly appreciated.

            Peace

            Create a working config
            How to add modules

            Mykle1M 1 Reply Last reply Reply Quote 0
            • Mykle1M Offline
              Mykle1 Project Sponsor Module Developer @Mykle1
              last edited by

              “Don’t forget to restart MM app after making this change.”

              I did restart the app, and a reboot when that didn’t work

              Create a working config
              How to add modules

              morozgrafixM 2 Replies Last reply Reply Quote 0
              • morozgrafixM Offline
                morozgrafix Moderator @Mykle1
                last edited by

                @Mykle1 I will try to reproduce it once I get home and will get back to you. Hang tight.

                1 Reply Last reply Reply Quote 1
                • morozgrafixM Offline
                  morozgrafix Moderator @Mykle1
                  last edited by morozgrafix

                  @Mykle1 Sorry about delay. It looks like your RasPi is using IPv6 and earlier I gave you instructions for IPv4. Sorry about misinformation.

                  For IPv6 setting ipWhitelist subnet mask to ::ffff:192.168.1.1/120 will give you access to 256 IP addresses. So your setting for ipWhitelist part in config.js would look like this:

                  ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.1/120"]
                  

                  After making changes restart MM and try to access from browser on your computer.

                  Let me know if it worked. Thanks.

                  Mykle1M 2 Replies Last reply Reply Quote 2
                  • Mykle1M Offline
                    Mykle1 Project Sponsor Module Developer @morozgrafix
                    last edited by

                    @morozgrafix - No worries about the delay at all. I appreciate your time and assistance.

                    I wish I could try that right now but I have to go to work. I will try the moment I get home and let you know how I make out.
                    In any case, thanks for the help.

                    Create a working config
                    How to add modules

                    1 Reply Last reply Reply Quote 0
                    • cowboysdudeC Offline
                      cowboysdude Module Developer
                      last edited by

                      Been watching this forum… Thanks guys you helped me and you didn’t even know it LOL

                      I have 3 mirrors running and there was no sense trying to maintain 3 … so maintain 1 and run it off the other 2… :)

                      1 Reply Last reply Reply Quote 0
                      • Mykle1M Offline
                        Mykle1 Project Sponsor Module Developer @morozgrafix
                        last edited by

                        @morozgrafix

                        Oh yes, that worked perfectly. I couldn’t wait to get home to try it. Thank you, very much.

                        If I may ask: Now that I can see MM running on the Pi3 from another computer on my network, can I merely view it or is there some control of MM that I can use remotely? If so, can you direct me to where I can find those commands? If I should ask this question elsewhere then I apologize. Kindly direct me to where I should ask, if this is the case.

                        Again, thank you for your assistance and time and effort on my behalf.

                        Create a working config
                        How to add modules

                        yawnsY 1 Reply Last reply Reply Quote 0
                        • yawnsY Offline
                          yawns Moderator @Mykle1
                          last edited by

                          @Mykle1 said in How to set ipWhitelist for all device can acess to MagicMirror v2?:

                          @morozgrafix

                          can I merely view it or is there some control of MM that I can use remotely?

                          http://beta.magicmirror.builders/module/24/remote-control ;)

                          Mykle1M 1 Reply Last reply Reply Quote 1
                          • A Offline
                            AAPS
                            last edited by AAPS

                            If having “/24” in my ipWhitelist works, should it be fine without changing to “/120” ? This has been confusing me lately, so any help would be appreciated.

                            morozgrafixM 1 Reply Last reply Reply Quote 0
                            • morozgrafixM Offline
                              morozgrafix Moderator @AAPS
                              last edited by morozgrafix

                              @Mykle1 Glad it all worked out!

                              @AAPS Theoretically you are fine but you are whitelisting a lot of IPs. Assuming you are talking about IPv6. Here is a brief explanation example:

                              192.168.1.1/24 subnet mask on IPv4 network would cover IP 256 IP addresses ranging from 192.168.1.0 to 192.168.1.255.

                              Start IP: 192.168.1.0
                              End IP: 192.168.1.255
                              Addresses: 256
                              Class: Class C
                              Netmask: 255.255.255.0.
                              Binary: 11111111	11111111	11111111	00000000
                              

                              ::ffff:192.168.1.1/120 subnet mask on IPv6 network would also cover 256 IP addresses

                              Start Range: 0:0:0:0:0:ffff:c0a8:100 (IPv4 equivalent of 192.168.1.0)
                              End Range: 0:0:0:0:0:ffff:c0a8:1ff (IPv4 equivalent of 192.168.1.255)
                              Addresses: 256
                              

                              Now if you have ::ffff:192.168.1.1/24 subnet mask on IPv6 network, you would allow 20282409603651670423947251286016 IPs to access your mirror. Which seems to be alot, but remember that devices most likely have to be on your home network in the first place.

                              Start Range: 0:0:0:0:0:0:0:0
                              End Range: 0:ff:ffff:ffff:ffff:ffff:ffff:ffff
                              Addresses: 20282409603651670423947251286016
                              

                              Here is a helpful cheat sheet for IPv4 and IPv6 subnet masks: https://kthx.at/subnetmask/

                              Hope this helps.

                              1 Reply Last reply Reply Quote 0
                              • A Offline
                                AAPS
                                last edited by

                                I seem to be fine, but do you recommend that I change anyway?

                                morozgrafixM 1 Reply Last reply Reply Quote 0
                                • morozgrafixM Offline
                                  morozgrafix Moderator @AAPS
                                  last edited by

                                  @AAPS It’s totally your call. I don’t think it affects anything as long as your network is closed and secure.

                                  A 1 Reply Last reply Reply Quote 1
                                  • A Offline
                                    AAPS @morozgrafix
                                    last edited by

                                    @morozgrafix Thanks! I am pretty late, but congrats to you and all the other new moderators.

                                    morozgrafixM 1 Reply Last reply Reply Quote 1
                                    • morozgrafixM Offline
                                      morozgrafix Moderator @AAPS
                                      last edited by

                                      @AAPS thank you.

                                      1 Reply Last reply Reply Quote 0
                                      • Mykle1M Offline
                                        Mykle1 Project Sponsor Module Developer @yawns
                                        last edited by

                                        @yawns Exactly what I was looking for. Thanks

                                        Create a working config
                                        How to add modules

                                        1 Reply Last reply Reply Quote 1

                                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                        With your input, this post could be even better 💗

                                        Register Login
                                        • 1 / 1
                                        • First post
                                          Last post
                                        Enjoying MagicMirror? Please consider a donation!
                                        MagicMirror created by Michael Teeuw.
                                        Forum managed by Sam, technical setup by Karsten.
                                        This forum is using NodeBB as its core | Contributors
                                        Contact | Privacy Policy