Is it possible to add comments to the Network > IP Blocklist?
-
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. -
@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.
-
@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.
-
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 -
@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!