a3dho3yn / ar-ipwhitelist

Whitelist ArvanCloud's IPs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ar-ipwhitelist

preview gif

This project modifies your firewall configuration to allow Arvancloud's CDN network access to your server.

Also, The bash script can be scheduled to update firewall rules automatically.

How to use

Just run the script and select your firewall from the list

Select a firewall to add IPs:
   1) UFW
   2) CSF
   3) firewalld
   4) iptables
   5) ipset+iptables
   6) nftables
Firewall: [YOUR INPUT]

Also, you can pass the firewall name in arguments:

src/ar-whitelister.sh ufw

Auto-update

You can create a cronjob to update the rules automatically.

Examples:

  • Update UFW rules every 6 hours
0 */6 * * * /path/to/ar-whitelister.sh ufw >/dev/null 2>&1
  • Update CSF rules every day at 1:00
0 1 * * * /path/to/ar-whitelister.sh csf >/dev/null 2>&1

Supported firewalls

These firewalls are supported currently:

  • UFW
  • CSF
  • firewalld
  • iptables
  • ipset+iptables
  • nftables

How to add more firewalls

If you use a firewall that is not listed here, you can:

  • Create an issue
  • Send a pull request

About

Whitelist ArvanCloud's IPs

License:Apache License 2.0


Languages

Language:Shell 100.0%