Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Elxis 5.5 Calypso supports 2 factor authentication login with e-mail or SMS.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
Security
»
Defender Excluded IPs - Network Address
« previous
next »
Print
Pages: [
1
]
Author
Topic: Defender Excluded IPs - Network Address (Read 5105 times)
perseas
Jr. Member
Posts: 97
Defender Excluded IPs - Network Address
«
on:
July 13, 2021, 15:22:50 »
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.
«
Last Edit: July 14, 2021, 23:42:04 by perseas
»
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Defender Excluded IPs - Network Address
«
Reply #1 on:
July 18, 2021, 20:35:42 »
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.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
perseas
Jr. Member
Posts: 97
Re: Defender Excluded IPs - Network Address
«
Reply #2 on:
July 18, 2021, 20:38:37 »
Do you have an example?
Logged
perseas
Jr. Member
Posts: 97
Re: Defender Excluded IPs - Network Address
«
Reply #3 on:
July 18, 2021, 20:46:58 »
ok Thanks. I understood
xxx.xxx.xxx.*
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Defender Excluded IPs - Network Address
«
Reply #4 on:
July 18, 2021, 20:54:17 »
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
«
Last Edit: July 18, 2021, 20:57:58 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
perseas
Jr. Member
Posts: 97
Re: Defender Excluded IPs - Network Address
«
Reply #5 on:
July 18, 2021, 21:01:30 »
Wildcards are not accepted from elxis.
(17.121.112.*,17.121.113.*,17.121.114.*,17.121.115.*,173.252.111.*,173.252.127.*,173.252.83.*,173.252.95.*)
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Defender Excluded IPs - Network Address
«
Reply #6 on:
July 18, 2021, 21:03:16 »
Read my answer again, I told you
No
. Ranges are supported only in blocking IPs.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Security
»
Defender Excluded IPs - Network Address