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

    Is it possible to add comments to the Network > IP Blocklist?

    Discuss
    3
    8
    317
    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.
    • d19dotca
      d19dotca last edited by

      Trying to add in an IP address to the IP Blocklist in Cloudron, and was going to add in a comment to each line item beside the IP so I can add notes about why it's being blocked, etc. Is this possible? I tried adding in \\ before the comment and after then IP address but it didn't accept it, same with /* <comment */, and # <comment>, etc. Nothing seems to work, so I'm thinking this isn't possible yet. If I'm missing something though, please let me know.

      --
      Dustin Dauncey
      www.d19.ca

      humptydumpty 1 Reply Last reply Reply Quote 1
      • humptydumpty
        humptydumpty @d19dotca last edited by

        @d19dotca This option seems to contradict what I've read in this post: https://forum.cloudron.io/topic/4664/restrict-dashboard-access-cloudron-v6-1-2?_=1615815159854

        It seems you'll have to do it in the firewall with your host.

        d19dotca 1 Reply Last reply Reply Quote 0
        • d19dotca
          d19dotca @humptydumpty last edited by

          @humptydumpty I believe that's a different use-case. In their case they were trying to forbid IPs only to their Dashboard, but presumably to other client apps. The Cloudron network firewall is basically an "all or nothing" firewall, to my knowledge so that's why that user couldn't do that for their use-case as they wanted it to succeed somewhere but fail somewhere else, and that can't be done.

          I want mine to fail everywhere as designed, just also the ability to add some comments beside an IP where I could write the mail server name or something for example.

          --
          Dustin Dauncey
          www.d19.ca

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

            This is supported. As far as the code goes, a comment is done with a prefix of # comment. Looking at the section there, the # has to be the first character in the line though. https://git.cloudron.io/cloudron/box/-/blob/master/src/network.js#L35

            d19dotca 1 Reply Last reply Reply Quote 2
            • d19dotca
              d19dotca @nebulon last edited by d19dotca

              @nebulon Oh I see, okay so I can add in comments but just not on the same line as the IP address. What I was trying to do was something like 111.111.111.111 # spammy mail server

              I see it works though if I write it like this then:

              # spammy mail server
              111.111.111.111
              

              Thanks man! 🙂

              --
              Dustin Dauncey
              www.d19.ca

              nebulon 1 Reply Last reply Reply Quote 1
              • nebulon
                nebulon Staff @d19dotca last edited by

                @d19dotca indeed that is correct, I guess we could improve the file parser at some point later, if this comes up more often.

                d19dotca 1 Reply Last reply Reply Quote 0
                • d19dotca
                  d19dotca @nebulon last edited by d19dotca

                  @nebulon I've created a merge request for updating the documentation to note about comments in the IP blocklist function.

                  --
                  Dustin Dauncey
                  www.d19.ca

                  nebulon 1 Reply Last reply Reply Quote 1
                  • nebulon
                    nebulon Staff @d19dotca last edited by

                    @d19dotca thanks! I've merged it

                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post
                    Powered by NodeBB