Title: IP Whitelist
Author: Awesoft
Published: <strong>24. januara 2025</strong>
Last modified: 11. oktobra 2026

---

Tykace pytaś

![](https://ps.w.org/awesoft-ip-whitelist/assets/banner-772x250.jpg?rev=3233258)

![](https://ps.w.org/awesoft-ip-whitelist/assets/icon-256x256.jpg?rev=3233258)

# IP Whitelist

 Wót [Awesoft](https://profiles.wordpress.org/awesoft/)

[Ześěgnuś](https://downloads.wordpress.org/plugin/awesoft-ip-whitelist.1.1.0.zip)

 * [Drobnostki](https://dsb.wordpress.org/plugins/awesoft-ip-whitelist/#description)
 * [Pógódnośenja](https://dsb.wordpress.org/plugins/awesoft-ip-whitelist/#reviews)
 *  [Instalacija](https://dsb.wordpress.org/plugins/awesoft-ip-whitelist/#installation)
 * [Wuwiśe](https://dsb.wordpress.org/plugins/awesoft-ip-whitelist/#developers)

 [Pódpěra](https://wordpress.org/support/plugin/awesoft-ip-whitelist/)

## Wopisanje

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**

 * Protects `/wp-admin` and `/wp-login.php`; the login protection can be switched
   off separately.
 * Accepts single IPv4 and IPv6 addresses and CIDR ranges such as `203.0.113.0/24`
   or `2001:db8::/32`.
 * Optional comments after `#` on each line so you can label entries.
 * Shows the IP address WordPress sees for you, with a one-click „Add to list“ button.
 * Lock-out guard: the whitelist refuses to enable itself if your own address is
   not on the list.
 * Choose where the visitor IP comes from: the connection address (default) or the`
   X-Forwarded-For`, `X-Real-IP` or `CF-Connecting-IP` header when the site runs
   behind a proxy, load balancer or Cloudflare. Headers are never trusted unless
   you select them.
 * Customisable access-denied message.
 * Public site features keep working: AJAX (`admin-ajax.php`), cron, WP-CLI, front-
   end `admin-post.php` submissions and password-protected post forms are not blocked.
 * Emergency bypass: define `AWESOFT_IP_WHITELIST_DISABLE` in `wp-config.php` to
   switch the whitelist off without database access.
 * `awesoft_ip_whitelist_allowed` filter for developers who need custom allow rules.
 * Removes all of its options when the plugin is deleted.

## Screenshots

[⌊The IP Whitelist entry under the Settings menu.⌉⌊The IP Whitelist entry under 
the Settings menu.⌉[

The IP Whitelist entry under the Settings menu.

[⌊The settings page with the detected IP address, allowed addresses and proxy header
options.⌉⌊The settings page with the detected IP address, allowed addresses and 
proxy header options.⌉[

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.⌉⌊What a blocked
visitor sees when trying to open the admin area.⌉[

What a blocked visitor sees when trying to open the admin area.

[[

## Instalacija

 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.

## FAQ

### 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.

## Reviews

There are no reviews for this plugin.

## Sobustatkujuce a wuwijarje

„IP Whitelist“ jo software wótwórjonego žrědła. Slědujuce luźe su pśinosowali k 
toś tomu tykacoju.

Sobustatkujuce

 *   [ Awesoft ](https://profiles.wordpress.org/awesoft/)

[Translate “IP Whitelist” into your language.](https://translate.wordpress.org/projects/wp-plugins/awesoft-ip-whitelist)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/awesoft-ip-whitelist/),
check out the [SVN repository](https://plugins.svn.wordpress.org/awesoft-ip-whitelist/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/awesoft-ip-whitelist/)
by [RSS](https://plugins.trac.wordpress.org/log/awesoft-ip-whitelist/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.1.0

 * New: IPv6 and CIDR range support.
 * New: Selectable visitor IP source for sites behind a reverse proxy, load balancer
   or Cloudflare.
 * New: Lock-out guard; the whitelist will not enable unless your current IP address
   matches the list.
 * New: Current IP address panel with an „Add to list“ button on the settings page.
 * New: Option to turn login page protection on or off, and a customisable access-
   denied message.
 * New: `AWESOFT_IP_WHITELIST_DISABLE` emergency constant and `awesoft_ip_whitelist_allowed`
   filter.
 * New: „Settings“ link on the Plugins screen.
 * Security: The `X-Forwarded-For` header is no longer trusted by default; it could
   be forged to bypass the whitelist.
 * Fix: Invalid entries are no longer saved to the list.
 * Fix: AJAX requests, cron and front-end `admin-post.php` submissions are no longer
   blocked for non-whitelisted visitors.
 * Fix: Login protection now uses the `login_init` action instead of the `authenticate`
   filter.
 * Options are removed when the plugin is deleted.

#### 1.0.2

 * Initial public release.

## Meta

 *  Version **1.1.0**
 *  Last updated **1 mjasec**
 *  Active installations **50+**
 *  WordPress version ** 6.0 abo nowša **
 *  Tested up to **7.1.4**
 *  PHP version ** 7.4 abo nowša **
 *  Language
 * [English (US)](https://wordpress.org/plugins/awesoft-ip-whitelist/)
 * Tags
 * [access](https://dsb.wordpress.org/plugins/tags/access/)[admin](https://dsb.wordpress.org/plugins/tags/admin/)
   [ip](https://dsb.wordpress.org/plugins/tags/ip/)[security](https://dsb.wordpress.org/plugins/tags/security/)
   [whitelist](https://dsb.wordpress.org/plugins/tags/whitelist/)
 *  [Rozšyrjony naglěd](https://dsb.wordpress.org/plugins/awesoft-ip-whitelist/advanced/)

## Pógódnośenja

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/awesoft-ip-whitelist/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/awesoft-ip-whitelist/reviews/)

## Sobustatkujuce

 *   [ Awesoft ](https://profiles.wordpress.org/awesoft/)

## Pódpěra

Got something to say? Need help?

 [Forum pomocy pokazaś](https://wordpress.org/support/plugin/awesoft-ip-whitelist/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://buymeacoffee.com/awesoft)