Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Docker IP range

    Support
    3
    17
    472
    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
      savity last edited by

      Hi,
      since it is a Enterprise enviroment we are using the IP range 172.17 or 172.16
      is there a supported way to reconfigure the Docker IP range? So i can use my smtprelay witch is in the network 172.17
      7816cdf5-73ae-4c4b-9068-83cac5aae3dd-image.png
      BR
      Ferat

      girish 1 Reply Last reply Reply Quote 0
      • girish
        girish Staff @savity last edited by

        @savity So, create a file named /etc/systemd/system/docker.service.d/custom.conf:

        [Service]
        ExecStart=
        ExecStart=/usr/bin/dockerd -H fd:// --log-driver=journald --exec-opt native.cgroupdriver=cgroupfs --storage-driver=overlay2 --experimental --ip6tables --bip 192.168.1.1/24 
        

        Then,

        # systemctl daemon-reload
        # systemctl restart box
        

        If you do, docker network inspect bridge, you will see the IP has changed.

        1 Reply Last reply Reply Quote 2
        • subven
          subven last edited by subven

          No need to touch docker config. Just use the configuration menu for the mail server within Cloudron.

          wesgwe4zher4hz.png

          You may also take a look at the docs for additonal network/DNS configuration --> Link.

          S 1 Reply Last reply Reply Quote 0
          • S
            savity @subven last edited by

            @subven Did already i am forwarding everything to my internal DNS Server and the host can also get the IP over using Host MAILSERVERNAME.domain.
            But i get directly the error the host is not reachable and as you can see on the Ping the route goes through the Docker IP-Bridge and there is no route i guess.

            Since the Mail server is in the same network as Docker is.... this is the issue

            subven 2 Replies Last reply Reply Quote 0
            • subven
              subven @savity last edited by

              @savity aaaah so you really have to change the docker0 bridge network. Changing the daemon configuration should not be the problem but how to make it work persistent for Cloudron is something I can't answer right now.

              Bye the way....it's not good practice and enterprisy to have your internal network at the default IP range for docker0 but I also saw bigger companys running 192.168.1.X internally....

              S 1 Reply Last reply Reply Quote 0
              • subven
                subven @savity last edited by

                @savity hmm according to devs, it should be possible to change the network. Take a look at this post.

                1 Reply Last reply Reply Quote 0
                • S
                  savity @subven last edited by

                  @subven Trust me when i tell you..... i adressed this 1000 times 🙂

                  subven 1 Reply Last reply Reply Quote 0
                  • subven
                    subven @savity last edited by

                    @savity said in Docker IP range:

                    @subven Trust me when i tell you..... i adressed this 1000 times 🙂

                    Yeah gotya ^^ As system administrator I had to deal with users not beeing able to use VPN and stuff because of stupid networking design all the time. Companies grow and not all are able to fix their sins.

                    1 Reply Last reply Reply Quote 1
                    • S
                      savity last edited by

                      @girish Would need help here i solved this issues by making configs directly on another Linux Machine by

                      /etc/docker/daemon.json
                      {
                      "default-address-pools":
                      [
                      {"base":"10.10.0.0/16","size":24}
                      ]
                      }

                      subven 1 Reply Last reply Reply Quote 0
                      • subven
                        subven @savity last edited by

                        @savity said in Docker IP range:

                        @girish Would need help here i solved this issues by making configs directly on another Linux Machine by

                        /etc/docker/daemon.json
                        {
                        "default-address-pools":
                        [
                        {"base":"10.10.0.0/16","size":24}
                        ]
                        }

                        Don't think this will work because from what I understand is that you have to recreate the containers. Take a look at the post I linked above.

                        S 1 Reply Last reply Reply Quote 0
                        • S
                          savity @subven last edited by

                          @subven I did and tried also with 10.10 network no chance still no route

                          1 Reply Last reply Reply Quote 0
                          • girish
                            girish Staff @savity last edited by

                            @savity said in Docker IP range:

                            is there a supported way to reconfigure the Docker IP range? So i can use my smtprelay witch is in the network 172.17

                            Cloudron uses the 172.18.x.x network for docker containers. So, I am guessing the problem is something else? The ping screenshot you posted in your initial post, is that from inside a container or is that from the host?

                            S 2 Replies Last reply Reply Quote 0
                            • S
                              savity @girish last edited by

                              @girish It is from the Host yes
                              I wanna Ping 172.17.x.x and this is the nic adapter IP
                              172.16.x.x/16

                              1 Reply Last reply Reply Quote 0
                              • S
                                savity @girish last edited by savity

                                @girish Then this must be the issue?
                                3abc2172-77fd-4e25-9bfe-acfe7bb2a2bb-image.png I did not creat those bridges and it is a standard cloudron installation

                                girish 1 Reply Last reply Reply Quote 0
                                • girish
                                  girish Staff @savity last edited by

                                  @savity Ah indeed, it seems that docker uses 172.17 by default. Let me check how to workaround this.

                                  1 Reply Last reply Reply Quote 1
                                  • girish
                                    girish Staff last edited by

                                    @savity OK, I might have a solution for this. Still testing. Hopefully, should have a workaround tomorrow.

                                    S 1 Reply Last reply Reply Quote 1
                                    • S
                                      savity @girish last edited by

                                      @girish Any news here girish.

                                      girish 1 Reply Last reply Reply Quote 0
                                      • girish
                                        girish Staff @savity last edited by

                                        @savity So, create a file named /etc/systemd/system/docker.service.d/custom.conf:

                                        [Service]
                                        ExecStart=
                                        ExecStart=/usr/bin/dockerd -H fd:// --log-driver=journald --exec-opt native.cgroupdriver=cgroupfs --storage-driver=overlay2 --experimental --ip6tables --bip 192.168.1.1/24 
                                        

                                        Then,

                                        # systemctl daemon-reload
                                        # systemctl restart box
                                        

                                        If you do, docker network inspect bridge, you will see the IP has changed.

                                        1 Reply Last reply Reply Quote 2
                                        • Topic has been marked as a question  girish girish 
                                        • Topic has been marked as solved  girish girish 
                                        • First post
                                          Last post
                                        Powered by NodeBB