My staff and I’ve tried to make 2FA plugins work with WordPress just a few occasions, however it by no means appears to work correctly, and I find yourself eradicating the plugin. Right now, I attempted to make use of the strategy given right here, which offers code for implementing an IP whitelist by pasting the next code in:
AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName "WordPress Admin Entry Management"
AuthType Fundamental
<LIMIT GET>
order deny,enable
deny from all
# whitelist Syed's IP handle
enable from xx.xx.xx.xxx
# whitelist David's IP handle
enable from xx.xx.xx.xxx
</LIMIT>
I used to be logged in with WordPress on the time, and I edited the .htaccess file through FTP. Immediately, I can’t entry our web site (www.csca.ca) in any respect from my very own IP. I can entry it over LTE or with a VPN, however not from my residence IP. So I simply reverted the .htaccess file to what it was earlier than, however I am nonetheless locked out. How can I undo this?
.htaccess file earlier than (and what it’s once more now)
#Start Actually Easy Safety
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
#Finish Actually Easy Safety
# BEGIN WordPress
# The directives (strains) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and will solely be modified through WordPress filters.
# Any modifications to the directives between these markers might be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
.htaccess file after (My IP is changed with 123… for privateness right here, however I really left my colleague’s IP as xx.xx.xx.xxx, pondering I would exchange it later.)
#Start Actually Easy Safety
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
#Finish Actually Easy Safety
# BEGIN WordPress
# The directives (strains) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and will solely be modified through WordPress filters.
# Any modifications to the directives between these markers might be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# Start IP whitelist
AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName "WordPress Admin Entry Management"
AuthType Fundamental
<LIMIT GET>
order deny,enable
deny from all
# whitelist Marks's IP handle
enable from 12.34.56.789
# whitelist David's IP handle
enable from xx.xx.xx.xxx
</LIMIT>
# Finish IP whitelist
When I attempt to entry the web page from my IP, all I see is that this:
This web site can’t be reached www.csca.ca took too lengthy to reply. Attempt:
Checking the connection Checking the proxy and the firewall
ERR_CONNECTION_TIMED_OUT