Best way to get OMV and pi-hole to play nice?

  • You'll get little or no help with that yaml file because it is not properly formatted. Post it in a code box.

    --
    Google is your friend and Bob's your uncle!


    A backup strategy is worthless unless you have a verified to work by testing restore strategy.


    OMV AMD64 7.x on headless Chenbro NR12000 1U Intel Xeon CPU E3-1230 V2 @ 3.30GHz 32GB ECC RAM.


  • yes, that part is not necesary if you previosly created my-macvlan on compose webGUI.


    And please post properly well indented yaml file on a code box.



    PD: You can use the pihole.yaml file on my signature

    • Official Post

    Any idea what I did wrong?

    As you have already been told, you must publish the file in a code box. As you have published it, not all the possible errors are visible.

    If you receive an error in a red box, copy it to the clipboard in notifications and paste it into the forum in text format in a code box. Don't post a screenshot.

  • ya, sorry about that, I got confused and thought pressing the quote on the bottom of your reply was the method, I missed that it is at the top of the reply bar. I did copy and paste the code that was indented, but because I forgot that the code button was at the top it got reformatted.... here it is.


    Code
    I created a macvlan network and called it "my-macvlan" . The output of that docker network inspect i as follows:
    
    [ { "Name": "my-macvlan", "Id": "1fd9109c6e48ff4ab5e804c83b827b999bb3a2a67046d27860da890a8152eaa7", "Created": "2023-09-13T17:04:09.362587608-04:00", "Scope": "local", "Driver": "macvlan", "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": {}, "Config": [ { "Subnet": "192.168.0.0/24", "IPRange": "192.168.0.240/29", "Gateway": "192.168.0.1" } ] }, "Internal": false, "Attachable": false, "Ingress": false, "ConfigFrom": { "Network": "" }, "ConfigOnly": false, "Containers": {}, "Options": { "parent": "eth0" }, "Labels": {} }
    ]
    
    END OF LINE
    
    

    I will leave off the last part from networks, down, I wasn't sure why it had networks twice, I was trying to follow a couple examples.


    So essentially am I to infer from the indent placing of the "network" code that "networks" to the far left means create and everything more to the right means more read or access this? Is there a recommended guide on the formation of docker compose that makes it easier to understand? (webpage or video series?)

    • Official Post
    Code
    networks:
      my-macvlan:
        driver: macvlan
        driver_opts:
          parent: eth0 # network interface
        ipam:
          config: 
            - subnet: 192.168.0.0/24     # subnet ip
            - gateway: 192.168.0.1       # router gateway ip
            - ip_range: 192.168.0.240/29 # ip range set in dhcp on router

    I have no idea where all this came from. I suppose from some procedure you found somewhere. That's another way of doing it.

    There are many different ways to do things in linux. The only thing I can say is that you should choose a procedure, the one you like the most, and follow it from the beginning to the end. If it doesn't work for you, choose another one, start from scratch and follow it from the beginning to the end. If you mix some procedures with others you will not achieve anything positive.

  • I just get confused, Really frustrated might be a better word. This trying to set up pi-hole has been going on for the better part of a month now and I have be unable to get it running. I really drains me, to fail over and over again. So I guess I just become unsure, don't want to ask even more stupid sounding questions here (really it is embarrassing for me, to seem so dimwitted), so when I learn a little and fail, I read from other sources and see if changing it might help.


    For example before I failed on the compose I showed (with the extra network creation at the end) I failed with out it with the following error (at the end of the red error I took a screen shot of) which speaks to my my-macvlan being undefined. That is when I searched some more and found some info (wrong in hind site) hoping to figure out how to "define" the macvlan I set up "my-macvlan". Here was my error in OMV when I tried to start it and here is the output from my creation of my macvlan network . I don't understand why it doesn't work and it is embarrassing to be have to be walked through this like a child, but here I am.


    So any ideas?


    Code
    [ { "Name": "my-macvlan", "Id": "1fd9109c6e48ff4ab5e804c83b827b999bb3a2a67046d27860da890a8152eaa7", "Created": "2023-09-13T17:04:09.362587608-04:00", "Scope": "local", "Driver": "macvlan", "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": {}, "Config": [ { "Subnet": "192.168.0.0/24", "IPRange": "192.168.0.240/29", "Gateway": "192.168.0.1" } ] }, "Internal": false, "Attachable": false, "Ingress": false, "ConfigFrom": { "Network": "" }, "ConfigOnly": false, "Containers": {}, "Options": { "parent": "eth0" }, "Labels": {} }
    ]
    
    END OF LINE


  • update:


    I ran my problem through chatGPT.


    It seems my error was that I still needed to put the second networks line in, but it needed to be formatted as follows:


    All this for missing "external: true.


    Crap.


    Well another learning lesson. Sorry to bother anyone out here, I am grateful for all the help, everyone has given me.

  • you are also missing paths to folders


    Code
          - './etc-pihole:/etc/pihole'
          - './etc-dnsmasq.d:/etc/dnsmasq.d'
  • you are also missing paths to folders


    Code
          - './etc-pihole:/etc/pihole'
          - './etc-dnsmasq.d:/etc/dnsmasq.d'

    I asked chatGPT that very question when it spat me out a docker compose... It said I could use just the ./ and it would point to the directory where docker was installed.


    The ./ seems to have placed the paths in my correct directories (as far as I can tell), on my connected SSD.


    Here is the output.


    It is running, but in your opinion is it not correct or flawed?

    • Official Post

    I ran my problem through chatGPT.


    It seems my error was that I still needed to put the second networks line in, but it needed to be formatted as follows:

    You had the answer that chatgpt gave you in the first procedure I gave you. Here: https://wiki.omv-extras.org/do…_interface_in_a_container

    You just had to follow the procedure until the end.



    The ./ seems to have placed the paths in my correct directories (as far as I can tell), on my connected SSD.

    Those are relative paths and it is correct. Those folders will be created in the folder you have defined in Services>Compose>Settings in the Compose Files Section, as explained here. https://wiki.omv-extras.org/do…-compose_with_the_plug-in


  • Are you using Docker Compose to manage any other containers on your system? If so, are you having any trouble with those containers? Because I do and Idk how to manage this...

    Any feedback will be appreciated.

  • Hi can you help me?


    this is my stack

    The log:


    [i] Starting docker specific checks & setup for docker pihole/pihole

    [i] Setting capabilities on pihole-FTL where possible

    [i] Applying the following caps to pihole-FTL:

    * CAP_CHOWN

    * CAP_NET_BIND_SERVICE

    * CAP_NET_RAW

    [i] Ensuring basic configuration by re-running select functions from basic-install.sh

    [i] Installing configs from /etc/.pihole...

    [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!

    [i] Installing /etc/dnsmasq.d/01-pihole.conf...

    [✓] Installed /etc/dnsmasq.d/01-pihole.conf

    [i] Installing /etc/.pihole/advanced/06-rfc6761.conf...

    [✓] Installed /etc/dnsmasq.d/06-rfc6761.conf

    [i] Installing latest logrotate script...

    [✓] Installing latest logrotate script

    [i] Creating empty /etc/pihole/setupVars.conf file.

    [i] Assigning password defined by Environment Variable

    [✓] New password set

    [i] Added ENV to php:

    "TZ" => "Europe/Rome",

    "PIHOLE_DOCKER_TAG" => "",

    "PHP_ERROR_LOG" => "/var/log/lighttpd/error-pihole.log",

    "CORS_HOSTS" => "",

    "VIRTUAL_HOST" => "pihole",

    [i] Using IPv4 and IPv6

    [i] Installing latest Cron script...

    [✓] Installing latest Cron script

    [i] setup_blocklists now setting default blocklists up:

    [i] TIP: Use a docker volume for /etc/pihole/adlists.list if you want to customize for first boot

    [i] Blocklists (/etc/pihole/adlists.list) now set to:

    https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts

    [i] Configuring default DNS servers: 8.8.8.8, 8.8.4.4

    [i] Applying pihole-FTL.conf setting LOCAL_IPV4=0.0.0.0

    [i] FTL binding to default interface: eth0

    [i] Enabling Query Logging

    [i] Testing lighttpd config: Syntax OK

    [i] All config checks passed, cleared for startup ...

    [i] Docker start setup complete

    [i] pihole-FTL (no-daemon) will be started as pihole

    s6-rc: info: service _startup successfully started

    s6-rc: info: service pihole-FTL: starting

    s6-rc: info: service pihole-FTL successfully started

    s6-rc: info: service lighttpd: starting

    s6-rc: info: service lighttpd successfully started

    s6-rc: info: service _postFTL: starting

    Checking if custom gravity.db is set in /etc/pihole/pihole-FTL.conf

    s6-rc: info: service _postFTL successfully started

    s6-rc: info: service legacy-services: starting

    s6-rc: info: service legacy-services successfully started

    [i] Creating new gravity database

    [i] Migrating content of /etc/pihole/adlists.list into new database

    [i] Neutrino emissions detected...


    [✓] Pulling blocklist source list into range

    [i] Preparing new gravity database...

    [✓] Preparing new gravity database

    [i] Creating new gravity databases...

    [✓] Creating new gravity databases

    [i] Using libz compression

    [i] Target: https://raw.githubusercontent.…nBlack/hosts/master/hosts

    [i] Status: Pending...

    [✓] Status: Retrieval successful


    [✓] Parsed 144136 exact domains and 0 ABP-style domains (ignored 1 non-domain entries)

    Sample of non-domain entries:

    - "0.0.0.0"

    [i] Building tree...

    [✓] Building tree

    [i] Swapping databases...

    [✓] Swapping databases

    [✓] The old database remains available

    [i] Number of gravity domains: 144136 (144136 unique domains)

    [i] Number of exact blacklisted domains: 0

    [i] Number of regex blacklist filters: 0

    [i] Number of exact whitelisted domains: 0

    [i] Number of regex whitelist filters: 0

    /bin/bash: line 1: 266 Hangup /usr/bin/pihole-FTL no-daemon > /dev/null 2>&1

    [i] Cleaning up stray matter...

    [✓] Cleaning up stray matter

    Stopping pihole-FTL

    pihole-FTL: no process found

    [✓] FTL is listening on port

    [✓] UDP (IPv4)

    [✓] TCP (IPv4)

    [✗] UDP (IPv6)

    [✓] TCP (IPv6)

    [i] Pi-hole blocking will be enabled

    [i] Enabling blocking


    [✓] Pi-hole Enabled

    /bin/bash: line 1: 402 Real-time signal 0 /usr/bin/pihole-FTL no-daemon > /dev/null 2>&1

    Stopping pihole-FTL

    pihole-FTL: no process found

    fatal: unable to access 'https://github.com/pi-hole/pi-hole/': Could not resolve host: github.com

    fatal: unable to access 'https://github.com/pi-hole/web/': Could not resolve host: github.com

    fatal: unable to access 'https://github.com/pi-hole/FTL/': Could not resolve host: github.com

    Pi-hole version is v5.17.2 (Latest: N/A)

    web version is v5.21 (Latest: v5.21)

    FTL version is v5.23 (Latest: N/A)

    Container tag is: 2023.11.0


    What i wrong? Thanx

    • Official Post

    - subnet: 192.168.1.10/24

    Possibly this is the error. I think it should be:

    - subnet: 192.168.1.0/24

    Anyway, here is a procedure to do this that I would say is simpler. https://wiki.omv-extras.org/do…_the_same_lan_as_the_host

    this "app" is only for raspberry?

    No, it is not only for raspberry. It is a docker container, unless that container is created for arm architecture it should work on your PC. Pihole works on amd64 architecture too.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!