Support > Security

Defender Excluded IPs - Network Address

(1/2) > >>

perseas:
Can we set a Network Address in
Control panel>Settings>Security>Excluded IPs
like
xxx . xxx . xxx .0/24
or
xxx . xxx . xxx.0-255
or
xxx . xxx . xxx.0 - xxx . xxx . xxx.255
Thanks in advance.

datahell:
No, the whitelist IPs should be set as single IP addresses. It is easy to change it but at this moment the check is performed on single IPs. On the other hand, you can use wildcards on block IP addresses.

perseas:
Do you have an example?

perseas:
ok Thanks. I understood
xxx.xxx.xxx.*

datahell:
I found a nice function to check if an IP is within a CIDR network range.
https://gist.github.com/tott/7684443

An other way is to provide the 2 lower and higher ips, convert them into long integers (with ip2long) and then check if the user's IP is within this range.

Attention: Both methods work only with IPv4 IPs.

Tip: You dont need to modify Elxis or the defender to add this special functionality. You can add your custom code in your template ;-)

Edit: This one supports both IPv4 and v6 IPs

Navigation

[0] Message Index

[#] Next page

Go to full version