In the Clean and Lock extension I can whitelist my IP address to limit access to WP Admin pages and wp-login.php.
But I have a dynamic IP address (can’t change that) which always looks like this:
109.40.*.**
So 109.40. is always the same, but the other numbers change every day. Can I use some kind of wildcard option like this: 109.40.*.** ?
One other question: suppose I lock myself out because of the IP address has changed in something completely different. Can I login at my MainWP install with sFTP and simply delete the Clean and Lock extension? Would that also delete the IP restriction?
@Alwin MainWP Clean & lock allows for any variation of htaccess IP syntax so IP address ranges and wildcards should work. These settings get saved directly within your MainWP’s htaccess file.
I would use: 109.40.0.0/16
But even 109.40 should work.
Just make sure you have access to the .htaccess file in the root of the site to fix it, if you happen to lock yourself out. And you can test it by using a mobile internet connection (not WiFi) or a VPN or by asking someone else.
Did you check how the IPs were added to .htaccess? I haven’t used it like this before via MainWP, so I’m not sure if it actually works. @kwcjr can you have this checked?
Basically it says that the last 2 parts of the IP address can be anything. A normal IP would be /32, if only the last group is a wildcard it would be /24 and you can also have other groups, but it’s explained more on https://whatismyipaddress.com/cidr (or google for CIDR) and on CIDR to IPv4 Address Range Utility Tool | IPAddressGuide you can convert CIDR and IP ranges to each other.
It’s indeed quite difficult, but I hope you understand a little what it does. You can always read more about it if you want.
All the mentioned “wildcard” notations should do the same, but the CIDR notation (109.40.0.0/16) is quite common, so that would be my choice. Just try it out and let someone test it from another internet connection (different IP range).