Linux 软件免费装
Banner图

IP Whitelist

开发者 awesoft
更新时间 2026年10月11日 16:49
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

security admin ip access whitelist

下载

1.0.1 1.0.2 1.0.0 1.1.0

详情介绍:

IP Whitelist lets administrators limit access to the WordPress dashboard and login page to a list of trusted IP addresses. Any visitor whose address is not on the list receives a 403 "Access Denied" response, which keeps brute-force bots and curious strangers away from /wp-admin and /wp-login.php without touching the public site. Features

安装:

  1. Upload the awesoft-ip-whitelist folder to /wp-content/plugins/, or install it from the WordPress plugin directory.
  2. Activate the plugin through the Plugins screen.
  3. Go to Settings → IP Whitelist.
  4. Click Add to list next to your detected IP address (or type the addresses and ranges you want to allow, one per line).
  5. If your site is behind a proxy or CDN, pick the matching Visitor IP source.
  6. Tick Enable the IP whitelist and save.

屏幕截图:

  • The settings page with the detected IP address, allowed addresses and proxy header options.
  • What a blocked visitor sees when trying to open the admin area.

升级注意事项:

1.1.0 The X-Forwarded-For header is no longer trusted by default. If your site runs behind a proxy or CDN, open Settings → IP Whitelist and select the matching visitor IP source.

常见问题:

I locked myself out. How do I get back in?

Add the following line to wp-config.php and the whitelist is bypassed immediately: define( 'AWESOFT_IP_WHITELIST_DISABLE', true ); Then log in, fix the list, and remove the line again. Alternatively, delete the awesoft_ip_whitelist_enabled option from the wp_options table, or remove the plugin folder over FTP/SSH.

My site is behind Cloudflare / a load balancer and the plugin shows the wrong IP.

By default the plugin only trusts the connection address (REMOTE_ADDR), which is the proxy's address in that setup. Choose the header your proxy sets under Visitor IP source: CF-Connecting-IP for Cloudflare, X-Forwarded-For for most load balancers, or X-Real-IP for Nginx. Only do this when a proxy really sits in front of the site, because visitors can forge these headers otherwise.

Does it block the REST API or AJAX?

No. Only the admin screens and the login page are protected. admin-ajax.php, wp-cron.php, WP-CLI and front-end form submissions to admin-post.php are left alone so themes and plugins keep working for every visitor.

Can I allow a whole network?

Yes. Use CIDR notation, for example 203.0.113.0/24 for an IPv4 range or 2001:db8::/32 for IPv6.

Can I add custom allow rules from code?

Use the awesoft_ip_whitelist_allowed filter. It receives the current decision, the visitor's candidate IP addresses and the configured rules, and must return a boolean.

更新日志:

1.1.0 1.0.2