Third Party Contributions > API Based Plugins

How to disable a plugin 2FA for a specific IP address

(1/1)

mdenizli:
If a connection is made with an IP other than a static IP, I want two factors to be active. How can I do that?

Local IP block: 172.16.x.x
static ip address: 31.223.10.104

config.inc.php open the file

// whitelist, CIDR format available
// NOTE: we need to use .0 IP to define LAN because the class CIDR have a issue about that (we can't use 129.168.1.2/24, for example)
$rcmail_config['whitelist'] = array('172.16.0.0/16', '31.223.10.104');

I edit it like this but it doesn't work. Where am I making a mistake?

SKaero:
I haven't used the plugin so I can't say for sure what the configuration needs to be, but one think I noticed is that the config.inc.php no longer uses the "$rcmail_config" variable for the config it now uses the "$config" variable so try changing that.

mdenizli:
But here's the thing. When 127.0.0.1 is added, two factors are disabled for all IPs. So doesn't it show that the system is working? But when we add the local IP and static IP we want, it doesn't work.

Navigation

[0] Message Index

Go to full version