US IP Whitelist Script

This repository contains a single Bash script, whitelist_us.sh, which configures the local system firewall to allow only traffic from IP ranges assigned to the United States. The script downloads IP block lists, creates ipset sets for IPv4/IPv6, and inserts iptables/ip6tables rules to drop non-US traffic.

Warning

This script modifies firewall rules and can block legitimate traffic if used incorrectly. Run it only on systems where you understand the impact. Test in a safe environment before applying to production.

Requirements

  • A Debian/Ubuntu-like Linux distribution with apt (tested on Debian/Ubuntu).
  • sudo privileges.
  • The script will install the following tools if not present: ipset, iptables, ip6tables, wget.

Usage

Mak…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help