Skip to content

Instantly share code, notes, and snippets.

@vitalyford
Created March 11, 2022 17:03
Show Gist options
  • Save vitalyford/32d0d9e01a88c5f6da80d8a91685111e to your computer and use it in GitHub Desktop.
Save vitalyford/32d0d9e01a88c5f6da80d8a91685111e to your computer and use it in GitHub Desktop.
Run with sudo
#!/bin/bash
wget -O rules.v4 https://gist.githubusercontent.com/vitalyford/6ddb2ba24a072f2d442ee4d5ee62c006/raw/f8049ee12164bd608c8a2b2f7288897cd1f686df/rules.v4
IP=$(curl https://ifconfig.me/ip)
sed -i "s/35.208.62.165/${IP}/g" rules.v4
cp rules.v4 /etc/iptables/rules.v4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment