🔐

IP Allowlist Rule Generator

Generate ready-to-paste IP allowlist and blocklist rules for nginx, Apache, iptables, UFW, and AWS Security Groups. Enter IP addresses or CIDR ranges, select your target platform, and get production-ready firewall config instantly.

Security ToolsPrivacy & Security
Loading tool...

How to Use IP Allowlist Rule Generator

How to Use the IP Allowlist Rule Generator

Step 1: Select Your Target Platform

Choose the server or firewall technology you want to generate rules for:

  • nginxallow / deny directives for server{} or location{} blocks
  • Apachemod_authz_host Require ip directives for Apache 2.4
  • iptablesiptables -A INPUT rules with optional port and protocol
  • UFWufw allow/deny from commands for Ubuntu/Debian firewall
  • AWS SG — JSON for aws ec2 authorize-security-group-ingress (allow) or NACL CLI commands (deny)

Step 2: Choose Rule Type

  • Allowlist — only the listed IPs are permitted; all others are blocked (a deny all / drop rule is appended automatically where applicable)
  • Blocklist — the listed IPs are explicitly denied; all other traffic is allowed by default

Step 3: Enter IP Addresses

Paste one IP or CIDR range per line. The tool accepts:

  • Single IPv4: 203.0.113.10
  • IPv4 CIDR: 192.168.1.0/24
  • Single IPv6: 2001:db8::1
  • IPv6 CIDR: 2001:db8::/32
  • Comments starting with # are ignored

Invalid entries are highlighted and skipped — valid IPs still produce output.

Step 4: Set Port and Protocol (iptables, UFW, AWS)

For platforms that support port-level filtering, optionally enter:

  • Port: a single port (443), a range (8080-8090), or leave blank for any port
  • Protocol: TCP, UDP, or All

nginx and Apache access control operates at the HTTP request level, so port/protocol are not applicable there.

Step 5: Copy and Deploy

Click Copy Rules to copy the generated configuration. Paste it into the appropriate location:

PlatformWhere to paste
nginxInside server{} or location{} block
ApacheIn httpd.conf, <VirtualHost>, or .htaccess
iptablesRun as root in terminal or add to startup script
UFWRun each ufw command as root
AWS SGUse as --ip-permissions argument or save as JSON file

CIDR Notation Quick Reference

CIDRAddressesExample use
/321 (single host)One specific IP
/2816Small office block
/24256Class C subnet
/1665,536Large corporate range
/816.7 millionEntire ISP or region

Frequently Asked Questions

Most Viewed Tools

🔐

TOTP Code Generator

2,929 views

Generate time-based one-time passwords from a TOTP secret key. Enter your base32 secret, choose a period and digit length, and get the current and next codes with a live countdown timer. Useful for testing and debugging 2FA integrations.

Use Tool →
🔍

Secret and Credential Scanner

2,472 views

Scan pasted text, code, or config files for accidentally exposed API keys, tokens, passwords, and private keys. Detects 50+ secret types across AWS, GitHub, Stripe, OpenAI, and more — all client-side, nothing leaves your browser.

Use Tool →
🔑

Password Entropy Calculator

2,399 views

Calculate the information-theoretic bit entropy of any password or API key. Detects character set pools automatically, shows the total number of possible combinations, and estimates crack time across five attack scenarios from rate-limited web logins to GPU cracking clusters.

Use Tool →
🔐

TLS Cipher Suite Checker

2,371 views

Check TLS protocol version compatibility and cipher suite strength ratings against current best practices. Supports IANA and OpenSSL cipher names — rates each suite as Strong, Weak, or Deprecated and explains why.

Use Tool →
🔒

Content Security Policy Generator

2,064 views

Build Content Security Policy headers interactively. Toggle directives like script-src, style-src, and img-src, select allowed source tokens, and add custom origins. Instantly outputs your CSP as an HTTP header, meta tag, Nginx directive, or Apache header.

Use Tool →
📺

Screen Size Converter

1,836 views

Calculate screen width and height from diagonal size and aspect ratio. Convert between inches and centimeters for displays, TVs, and monitors with instant dimension calculations.

Use Tool →
🔐

API Key Hasher

1,762 views

Hash API keys using SHA-256, SHA-512, or PBKDF2 before storing them in your database. Generates a Node.js verification snippet and shows the recommended storage format — all 100% client-side using the Web Crypto API.

Use Tool →
🔐

SSH Key Generator

1,571 views

Generate Ed25519 and RSA 4096-bit SSH key pairs entirely in your browser. Keys are never sent to any server — 100% client-side using the Web Crypto API.

Use Tool →

Related Privacy & Security Tools

🔐

API Key Hasher

Hash API keys using SHA-256, SHA-512, or PBKDF2 before storing them in your database. Generates a Node.js verification snippet and shows the recommended storage format — all 100% client-side using the Web Crypto API.

Use Tool →
🛡️

PGP Key Generator

Generate PGP public and private key pairs for email encryption and code signing. Supports ECC (Curve25519) and RSA up to 4096-bit. Entirely browser-side — keys never leave your device.

Use Tool →
🔐

TOTP Code Generator

Generate time-based one-time passwords from a TOTP secret key. Enter your base32 secret, choose a period and digit length, and get the current and next codes with a live countdown timer. Useful for testing and debugging 2FA integrations.

Use Tool →
🔑

OAuth 2.0 Scope Builder

Build and decode OAuth 2.0 scope strings for Google, GitHub, Stripe, and custom providers. Toggle permissions with risk indicators, generate ready-to-use scope strings, and decode existing scope strings to understand what access they grant.

Use Tool →
🔐

TLS Cipher Suite Checker

Check TLS protocol version compatibility and cipher suite strength ratings against current best practices. Supports IANA and OpenSSL cipher names — rates each suite as Strong, Weak, or Deprecated and explains why.

Use Tool →
🔑

Password Entropy Calculator

Calculate the information-theoretic bit entropy of any password or API key. Detects character set pools automatically, shows the total number of possible combinations, and estimates crack time across five attack scenarios from rate-limited web logins to GPU cracking clusters.

Use Tool →
🔒

Content Security Policy Generator

Build Content Security Policy headers interactively. Toggle directives like script-src, style-src, and img-src, select allowed source tokens, and add custom origins. Instantly outputs your CSP as an HTTP header, meta tag, Nginx directive, or Apache header.

Use Tool →
🔐

SSH Key Generator

Generate Ed25519 and RSA 4096-bit SSH key pairs entirely in your browser. Keys are never sent to any server — 100% client-side using the Web Crypto API.

Use Tool →

Share Your Feedback

Help us improve this tool by sharing your experience

We will only use this to follow up on your feedback