• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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 116.5k 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.
  • L Offline
    lolobyte @mochman
    last edited by Jan 2, 2017, 9:04 PM

    @mochman

    Thank you.

    Now i understand this thematic a bit better an can solve my issue.

    1 Reply Last reply Reply Quote 0
    • S Offline
      schlachtkreuzer6
      last edited by Jan 2, 2017, 9:07 PM

      Thanks! but i don´t like this feature in the moment… i`m travelling with my “mirror” (home-work-home-work…) I´m not finishend yet, so its only a raspi with a screen in a small box XD

      1 Reply Last reply Reply Quote 0
      • L Offline
        looolz
        last edited by looolz Jan 2, 2017, 9:53 PM Jan 2, 2017, 9:36 PM

        Thank you for posting this! However, I still haven’t got it working yet. Access via VNC works fine, but not via a remote web browser.

        1: When I ran the command tail -f ~/MagicMirror/nohup.out I got this:

        Loading module helpers …
        Initializing new module helper …
        No helper found for module: helloworld.
        All module helpers loaded.
        Starting server op port 8080 …
        Server started …
        Connecting socket for: updatenotification
        Sockets connected & modules started …
        Fontconfig warning: ignoring UTF-8: not a valid region tag
        Launching application.

        Nothing more happens. I’ve tried to access the mirror both via Chrome and Safari. Both before and after I run the command. Nothing shows up in the log.

        My desktops IP is 10.0.0.95, so I added the ipWhitelist line:

            ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:10.0.0.95"],
        

        Still, I get the same error:

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

        I experimented with various writings, such as: “::fff:10.0.0.1/120” No dice.

        Is there a way to disable the whitelist function completely?

        M 1 Reply Last reply Jan 2, 2017, 10:59 PM Reply Quote 0
        • T Offline
          toonazd @mochman
          last edited by Jan 2, 2017, 9:47 PM

          @mochman thanks topman been trying to get this back up and running

          1 Reply Last reply Reply Quote 0
          • M Offline
            mochman Module Developer @looolz
            last edited by Jan 2, 2017, 10:59 PM

            @looolz When you run the mirror through VNC. If you leave the terminal open then try to open the mirror on your other computer, do you see the

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

            message? If so, does anything pop up in your terminal?

            Another thing to look at, if you run ifconfig and take a look at your wlan0 (assuming you are using wifi to get internet) do you see a “inet6 addr:”? If not, just try adding "10.0.0.95" to the whitelist.

            L O 2 Replies Last reply Jan 3, 2017, 6:33 AM Reply Quote 0
            • M Offline
              mochman Module Developer
              last edited by mochman Jan 2, 2017, 11:27 PM Jan 2, 2017, 11:26 PM

              A way to tell if you need to use "::ffff:192.168.1.120" or just "192.168.1.120"
              Run netstat -lnpt, if you see something like:

              tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 1271/electron.js

              Then you are using IPv4 and should add "YO.UR.IP.AD" or "YO.UR.IP.AD/24" to the whitelist.

              If you see: tcp6 0 0 :::8080 :::* LISTEN 1170/electron.js

              You are using IPv6 address schemas and need to add "::ffff:YO.UR.IP.AD" or "::ffff:YO.UR.IP.AD/120" to the whitelist.


              If you have IPv6 and want to turn it off, add ipv6.disable=1 to your /boot/cmdline.txt and restart your pi.

              1 Reply Last reply Reply Quote 2
              • X Offline
                xer0design
                last edited by Jan 3, 2017, 4:21 AM

                Not a fan of this addition; would have rathered it was something you enable rather than disable.

                For anyone wondering how to allow all ips, use:

                ipWhitelist: ["::fff:0.0.0.0/1", "::fff:128.0.0.0/2", "::fff:192.0.0.0/3", "::fff:224.0.0.0/4", "127.0.0.1", "::ffff:127.0.0.1", "::1"],
                
                L S 2 Replies Last reply Jan 3, 2017, 6:30 AM Reply Quote 3
                • L Offline
                  looolz @xer0design
                  last edited by Jan 3, 2017, 6:30 AM

                  @xer0design

                  Thanks! That worked for me!

                  1 Reply Last reply Reply Quote 0
                  • L Offline
                    looolz @mochman
                    last edited by Jan 3, 2017, 6:33 AM

                    @mochman

                    Thanks, I do see a inet6 address with the command ifconfig.

                    I tried to add 10.0.0.95 to the config with no success :-(

                    But @xer0design’s tip worked!

                    1 Reply Last reply Reply Quote 1
                    • S Offline
                      schlachtkreuzer6 @xer0design
                      last edited by Jan 3, 2017, 3:01 PM

                      @xer0design verry nice thx!

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 8
                      • 9
                      • 1 / 9
                      1 / 9
                      • First post
                        6/83
                        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