ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    PiHole for Friends and Family

    Scheduled Pinned Locked Moved IT Discussion
    67 Posts 14 Posters 11.1k Views
    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.
    • scottalanmillerS
      scottalanmiller @Alex Sage
      last edited by

      @aaronstuder said in PiHole for Friends and Family:

      @scottalanmiller I don’t have a Linux computer at my grandparents or it would be easy 😉

      Use Python or PowerShell

      A 1 Reply Last reply Reply Quote 1
      • A
        Alex Sage @scottalanmiller
        last edited by

        @scottalanmiller it’s a Mac

        black3dynamiteB scottalanmillerS 2 Replies Last reply Reply Quote 0
        • black3dynamiteB
          black3dynamite @Alex Sage
          last edited by

          @aaronstuder said in PiHole for Friends and Family:

          @scottalanmiller it’s a Mac

          Use Python.

          A 1 Reply Last reply Reply Quote 0
          • A
            Alex Sage @black3dynamite
            last edited by

            @black3dynamite said in PiHole for Friends and Family:

            @aaronstuder said in PiHole for Friends and Family:

            @scottalanmiller it’s a Mac

            Use Python.

            Sadly all I know about Python is it’s a snake...

            RamblingBipedR 1 Reply Last reply Reply Quote 2
            • RamblingBipedR
              RamblingBiped @Alex Sage
              last edited by

              @aaronstuder said in PiHole for Friends and Family:

              @black3dynamite said in PiHole for Friends and Family:

              @aaronstuder said in PiHole for Friends and Family:

              @scottalanmiller it’s a Mac

              Use Python.

              Sadly all I know about Python is it’s a snake...

              Use bash?

              scottalanmillerS 1 Reply Last reply Reply Quote 2
              • scottalanmillerS
                scottalanmiller @Alex Sage
                last edited by

                @aaronstuder said in PiHole for Friends and Family:

                @scottalanmiller it’s a Mac

                Hence Python, the universal system automation language.

                1 Reply Last reply Reply Quote 1
                • scottalanmillerS
                  scottalanmiller @RamblingBiped
                  last edited by

                  @ramblingbiped said in PiHole for Friends and Family:

                  @aaronstuder said in PiHole for Friends and Family:

                  @black3dynamite said in PiHole for Friends and Family:

                  @aaronstuder said in PiHole for Friends and Family:

                  @scottalanmiller it’s a Mac

                  Use Python.

                  Sadly all I know about Python is it’s a snake...

                  Use bash?

                  True, could be done just like on Linux.

                  1 Reply Last reply Reply Quote 0
                  • RomoR
                    Romo @Alex Sage
                    last edited by

                    @aaronstuder said in PiHole for Friends and Family:

                    What if I setup a dynamic DNS client on a computer, and have it update to my domain, say name.domain.com then have a script nslookup the domain name and update the firewall rules?

                    What OS are you going to be installing pi-hole in?

                    Liked the idea so just started working on the script, resolving the dynamic dns name and logging it and comparing it to the current ip is done. Just need to target your OS of choice to test the creation/destruction of the firewall rules.

                    https://github.com/rodrigo-hissam/dns_to_ip_firewall_rules/blob/master/dns-to-ip-firewall-rules.py

                    Example:

                    ~/scripts/python$ python dns-to-ip-firewall-rules.py 
                    
                    Adding to firewall - TODO
                    mangolassi.it - 104.25.47.32 
                    
                    Adding to firewall - TODO
                    google.com - 172.217.1.238 
                    
                    Adding to firewall - TODO
                    theverge.com - 151.101.65.52 
                    
                    #Log files created per host to store the previous ip for the comparison.
                    ~/scripts/python$ ls
                    dns-to-ip-firewall-rules.py  google.com  mangolassi.it  theverge.com
                    
                    # Re running the script to compare with logged ip
                    ~/scripts/python$ python dns-to-ip-firewall-rules.py 
                    
                    Same ip address nothing to do
                    mangolassi.it - 104.25.47.32 
                    
                    Same ip address nothing to do
                    google.com - 172.217.1.238 
                    
                    Adding 151.101.193.52 to firewall
                    theverge.com - 151.101.193.52 
                    
                    
                    
                    scottalanmillerS A 2 Replies Last reply Reply Quote 0
                    • KellyK
                      Kelly
                      last edited by

                      I am not a scripter, nor do I play one on TV, but you can get your public IP using this:

                      curl ifconfig.co
                      
                      1 Reply Last reply Reply Quote 3
                      • scottalanmillerS
                        scottalanmiller @Romo
                        last edited by

                        @romo use Ubuntu

                        JaredBuschJ RomoR 2 Replies Last reply Reply Quote 0
                        • JaredBuschJ
                          JaredBusch @scottalanmiller
                          last edited by

                          @scottalanmiller said in PiHole for Friends and Family:

                          @romo use Ubuntu

                          I installed it on Fedora 26 with no problem.

                          coliverC 1 Reply Last reply Reply Quote 1
                          • M
                            marcinozga
                            last edited by marcinozga

                            https://github.com/pi-hole/pi-hole/wiki/OpenVPN-server:-Only-route-DNS-via-VPN

                            If your f&f have routers with OpenVPN client, VPN would work.

                            1 Reply Last reply Reply Quote 0
                            • coliverC
                              coliver @JaredBusch
                              last edited by

                              @jaredbusch said in PiHole for Friends and Family:

                              @scottalanmiller said in PiHole for Friends and Family:

                              @romo use Ubuntu

                              I installed it on Fedora 26 with no problem.

                              Mine is also installed on Fedora 26.

                              1 Reply Last reply Reply Quote 0
                              • brandon220B
                                brandon220
                                last edited by

                                Fedora 26 here too. No issues at all.

                                1 Reply Last reply Reply Quote 0
                                • RomoR
                                  Romo @scottalanmiller
                                  last edited by Romo

                                  @scottalanmiller said in PiHole for Friends and Family:

                                  @romo use Ubuntu

                                  Script updated, automatic rule creation and deletion in Ubuntu working properly. Working on Fedora and firewalld next.

                                  NashBrydgesN A 2 Replies Last reply Reply Quote 1
                                  • NashBrydgesN
                                    NashBrydges @Romo
                                    last edited by

                                    @romo This is f'ing brilliant! The downside is that now I HAVE to try this on Vultr. Anyone have a script to add more hours in the day?

                                    Btw, what's your frequency for running this in cron? Every 5 mins? 15mins?

                                    A RomoR 2 Replies Last reply Reply Quote 0
                                    • A
                                      Alex Sage @Romo
                                      last edited by

                                      @romo thanks! 🙂

                                      1 Reply Last reply Reply Quote 0
                                      • A
                                        Alex Sage @NashBrydges
                                        last edited by

                                        @nashbrydges it is very nice indeed 🙂

                                        1 Reply Last reply Reply Quote 0
                                        • A
                                          Alex Sage @Romo
                                          last edited by

                                          @romo I love your script! Thank you so much! Sorry I didn’t reply before somehow I missed your post 😕

                                          Can you make this so I can set whatever ports I want? In the example I gave before I just wanted to do DNS but now my mind is spinning with other ideas 🙂

                                          RomoR 1 Reply Last reply Reply Quote 0
                                          • NashBrydgesN
                                            NashBrydges
                                            last edited by

                                            Now that I'll be testing Romo's script, I don't need to use VPN and I'd like to setup the admin page behind Nginx. Found a tutorial that allows admin page access using Nginx as a proxy but I can't get the HTTPS redirect to work right.

                                            https://github.com/pi-hole/pi-hole/wiki/Nginx-Configuration

                                            Anyone have a working Nginx config with HTTPS redirect for this?

                                            Found this that shows how to setup Let's Encrypt with lighttpd but don't know enough to set it up for other proper security headers.

                                            http://www.itzgeek.com/how-tos/linux/how-to-configure-lets-encrypt-ssl-in-lighttpd-server.html

                                            A black3dynamiteB 4 Replies Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 2 / 4
                                            • First post
                                              Last post