Comments (4)
You mean that you want to put your domain name into Whitelist of country code instead of putting 2 letters of country code, am I right?
I think it's easy to configure your .htaccess
(or something) to restrict IP addresses or domains for wp-login.php
.
How do you think?
from wordpress-ip-geo-block.
No, what I mean here is to use provider domain instead of (unknown) provider IP address range.
Afaik, .htaccess has same limitation as IP white/black list. It accepts only IP numbers.
Any country usually have more than one internet provider.
I guess, most of internet provider domains do not cross country borders.
In example, "US" country filter makes huge number of IP accessible to login.
But each ISP provider in US (I guess) uses his own domain to assign reverse lookup for connected (dhcp) clients.
Actually this would be reverse lookup of visitor IP compared with isp provider domain.
Something like
if (preg_match( "/gethostbyaddr(visitor-ip)$/", $provider-domain)).
where visitor IP (123.34.56.78) reverse lookup is "123.34.56.78.adsl.provider.net" and filter is ".adsl.provider.net"
from wordpress-ip-geo-block.
Hi @ddur,
I got your point. Then how about this:
function my_allow_domain( $validate ) {
$allowed_domain = 'your.domain';
$visitor_domain = gethostbyaddr( $validate['ip'] );
if ( preg_match( "/${visitor_domain}$/", $allowed_domain ) ) {
$validate['result'] = 'passed';
} elseif ( ! defined( 'DOING_AJAX' ) ) {
$validate['result'] = 'blocked';
} // else WP-ZEP block a malicious request
return $validate;
}
add_filter( 'ip-geo-block-login', 'my_allow_domain' );
add_filter( 'ip-geo-block-admin', 'my_allow_domain' );
See http://www.ipgeoblock.com/codex/ip-geo-block-xxxxx.html
from wordpress-ip-geo-block.
Thanks
from wordpress-ip-geo-block.
Related Issues (20)
- WordPress.com App fails to upload images
- WP ZEP for private/reserved IP HOT 1
- Post blocked by country listed on blog page HOT 3
- Unknown column 'last' in 'field list' HOT 2
- I only set GB in the white list but found that friend from HK can still access /wp-admin HOT 2
- Conflict with Wordfence plugin's Live Traffic Report HOT 1
- Not issue: IP Geo API provider class for Nginx compiled with GeoIP module HOT 2
- Latest update causes excessive website slowdowns HOT 1
- Question: ip-geo-block-auth-nonce query string HOT 4
- Website no longer responding, fixed by disabling plugin HOT 3
- XX private
- Blocking my own ip address, not respecting whitelist
- Is this a normal behavior?
- Issue with Woocommerce Admin
- Maxmind GeoIP and License key.
- jQuery Needs Update For WP 5.6
- Check "IP Location Block" based on "IP Geo Block" HOT 4
- E_COMPILE_ERROR in line 849 in the file IPv6.php (using php version 8.2.6) HOT 3
- Feature Request: Add IP2Location.io as New IP Geolocation API
- 0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordpress-ip-geo-block.