Sign inSign up

warmos/iptables-country-rules

By warmos

•Updated over 2 years ago

Image
0

520

warmos/iptables-country-rules repository overview

⁠IPTABLES country rules generator

This image can be used to generate iptables rules per country IP blocklists, which are provided by https://www.ipdeny.com⁠ . You should regenerate the rules at least each month.

⁠Usage

docker run warmos/iptables-country-rules:latest [action] [countrycodeList]

[action] = anything after the -j parameter in iptables (ACCEPT, DROP...)

[countrycodeList] = lowercase country codes list separated by comma. Codes are listed here: https://www.ipdeny.com/ipblocks/⁠

Command outputs the rules into STDOUT. Other output (info, error) to STDERR.

⁠Example: Accept all from EU

docker run warmos/iptables-country-rules:latest ACCEPT at,be,bg,cy,cz,de,dk,ee,es,fi,fr,gr,hr,hu,ie,it,lt,lu,lv,mt,nl,pl,pt,ro,se,si,sk > EUaccept.rules

⁠Example: Drop all from China

docker run warmos/iptables-country-rules:latest DROP cn > cndrop.rules

Tag summary

Content type

Image

Digest

sha256:c25fd655a…

Size

142.7 MB

Last updated

over 2 years ago

docker pull warmos/iptables-country-rules