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.

    ipWhitelist HowTo

    Scheduled Pinned Locked Moved Tutorials
    83 Posts 36 Posters 133.8k Views 34 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.
    • S Offline
      svenr
      last edited by

      I tried everything wich is written in this post but i cant make it all the time it says:

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

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

        @svenr said in ipWhitelist HowTo:

        Please check your config.js

        Are you saying that this is in your config.js file and you still cannot connect?

        var config = {
            address: "0.0.0.0", 
            port: 8080,
            ipWhitelist: [],
        

        Create a working config
        How to add modules

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          svenr @Mykle1
          last edited by svenr

          @Mykle1 alt text
          Yes right but maybe i have another mistake i am a beginner and i have not really a idea about it
          link text

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

            @svenr

            Looking at the picture you provided shows your ipWhitelist: [], is populated. Can you try it just like this? ipWhitelist: [],

            Create a working config
            How to add modules

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              svenr @Mykle1
              last edited by

              @Mykle1 like this it works. Thank you for your help!

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

                @svenr

                Good. Now all the devices on your network have access. If you want to limit access to specific devices then you should search this forum for ipWhitelist info. This topic has been discussed at length

                Create a working config
                How to add modules

                1 Reply Last reply Reply Quote 0
                • ToddKlindtT Offline
                  ToddKlindt @lavolp3
                  last edited by

                  @lavolp3 said in ipWhitelist HowTo:

                  Maybe I have missed this from someone else, but one important thing about the whitelisting message:

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

                  The EXACT SAME message appears (in my case) if the config.js has syntax errors. Locally your mirror will tell you that there is no config file or just give you a black screen, but if you try to reach it from outside through a browser (Firefox and Chrome in my case) with a broken config.js, you will get the whitelisting message above.

                  So, before trying to get your ipWhitelist in the right shape, make sure you have no other syntax errors with the mirror, e.g. using

                  npm run config:check
                  

                  If you had some and had them corrected, be safe and restart the mirror.
                  Below you can see the example in my case.

                  pi@magicmirror2:~ $ tail ~/.pm2/logs/mm-out-0.log
                  No helper found for module: helloworld.
                  All module helpers loaded.
                  Starting server on port 8080 ...
                  Server started ...
                  Connecting socket for: updatenotification
                  Sockets connected & modules started ...
                  Launching application.
                  Access denied to IP address: 66.249.93.64
                  Access denied to IP address: 80.157.5.50
                  Access denied to IP address: 80.157.5.50
                  pi@magicmirror2:~ $ cd MagicMirror/
                  pi@magicmirror2:~/MagicMirror $ npm run config:check
                  
                  > magicmirror@2.1.2 config:check /home/pi/MagicMirror
                  > node tests/configs/check_config.js
                  
                  Checking file...  /home/pi/MagicMirror/config/config.js
                  Line 260 col 9 Expected ']' to match '[' from line 26 and instead saw '{'.
                  Line 261 col 16 Expected '}' to match '{' from line 11 and instead saw 'module'.
                  Line 261 col 22 Missing semicolon.
                  Line 261 col 16 Unrecoverable syntax error. (95% scanned).
                  pi@magicmirror2:~/MagicMirror $ sudo nano config/config.js
                  pi@magicmirror2:~/MagicMirror $ npm run config:check
                  
                  > magicmirror@2.1.2 config:check /home/pi/MagicMirror
                  > node tests/configs/check_config.js
                  
                  Checking file...  /home/pi/MagicMirror/config/config.js
                  Your configuration file don't containt syntax error :)
                  pi@magicmirror2:~/MagicMirror $ pm2 restart mm
                  Use --update-env to update environment variables
                  [PM2] Applying action restartProcessId on app [mm](ids: 0)
                  [PM2] [mm](0) ✓
                  ┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬─────┬──────────┬──────┬──────────┐
                  │ App name │ id │ mode │ pid │ status │ restart │ uptime │ cpu │ mem      │ user │ watching │
                  ├──────────┼────┼──────┼─────┼────────┼─────────┼────────┼─────┼──────────┼──────┼──────────┤
                  │ mm       │ 0  │ fork │ 901 │ online │ 6       │ 0s     │ 18% │ 2.3 MB   │ pi   │ disabled │
                  └──────────┴────┴──────┴─────┴────────┴─────────┴────────┴─────┴──────────┴──────┴──────────┘
                   Use `pm2 show ` to get more details about an app
                  pi@magicmirror2:~/MagicMirror $
                  
                  

                  I wanted to quote this as it just happened to me. MM was working fine remotely. I made some edits to config.js and got the dreaded “This device is not allowed to access your mirror…" message. I hadn’t edited the whitelist, so I started doing all of the network troubleshooting. Seeing this post reminded me I had done some edits and sure enough, I missed a comma somewhere and the screwed it all up. Fixing that unrelated entry in the config.js made this error go away.

                  lavolp3L 1 Reply Last reply Reply Quote 0
                  • lavolp3L Offline
                    lavolp3 Module Developer @ToddKlindt
                    last edited by lavolp3

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      AndrewVircks
                      last edited by

                      I have tried all of the suggestions to get MMM-Remote-Control to work and I cannot figure anything out. Any help would be appreciated. I keep getting Cannot GET /remote.html and I’m not sure what to do from here.

                      1 Reply Last reply Reply Quote 0
                      • mochmanM Offline
                        mochman Module Developer
                        last edited by

                        That doesn’t sound like an ipWhitelist problem. Did you install MMM-Remote-Control per the instructions? If so, what exactly are you getting your error message on and what are the IPs of your magicmirror and device?

                        A 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 5
                        • 6
                        • 7
                        • 8
                        • 9
                        • 9 / 9
                        • 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