Skip to content

Block unwanted countries IPv4 & IPv6 ranges with firewalld using ipdeny.com

License

Notifications You must be signed in to change notification settings

framasoft/geoip-blocking-w-firewalld

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

demo

Firewall GeoIP script for firewalld

For those who need to block unwanted IPv4 and IPv6 target ranges by countries at server level using firewalld. I, myself have some use cases where servers are front facing the Internet, without WAF or CDN, so I wanted to easily secure them using firewalld.

Usage

  • Clone this repo
  • Define the countries ISO Alpha-2 code you want to block at line 18 (ZONES). Reference
  • Execute bash firewalld
  • Define a @weekly cronjob

Supported Operating Systems

  • Debian/Ubuntu
  • RHEL/CentOS

Contribute

All suggestions, feedback, or bug reports are welcome. Feel free to submit a PR.

Disclaimer

Use this script at your own risk! The author assumes no responsibility for any damages of any kind. It is strongly recommended you test this out on a test server before implemeting on production servers.

About

Block unwanted countries IPv4 & IPv6 ranges with firewalld using ipdeny.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%