This repository builds an "ultimate" Iran IP list for MikroTik routers by merging multiple country-IP sources, deduplicating them, re-aggregating them, and exporting import-ready MikroTik scripts.
The generator currently merges these sources:
- Loyalsoldier
geoip.dathttps://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat - Chocolate4U
geoip.dathttps://github.com/Chocolate4U/Iran-v2ray-rules/releases/latest/download/geoip.dat - IPDeny aggregated Iran CIDRs https://www.ipdeny.com/ipblocks/data/aggregated/ir-aggregated.zone
- IPDeny Iran country CIDRs https://www.ipdeny.com/ipblocks/data/countries/ir.zone
- IPToASN IPv4 country ranges https://iptoasn.com/data/ip2country-v4.tsv.gz
- IPToASN IPv6 country ranges https://iptoasn.com/data/ip2country-v6.tsv.gz
Running the generator writes these files into dist/:
iran-ips.rscImport-ready MikroTik script with deduplicated IPv4 and IPv6 address-list entries.iran-ips-reset-and-import.rscSame as above, but first removes existingiran-ipsentries from both IPv4 and IPv6 firewall address-lists.iran-ips.txtPlain CIDR list for inspection or reuse.metadata.jsonGeneration timestamp, source stats, success/failure details, and final IPv4/IPv6 counts.
go run ./cmd/iran-ips-genIf you want a clean replace, import dist/iran-ips-reset-and-import.rsc.
If you only want to add new entries, import dist/iran-ips.rsc.
Example:
/import file-name=iran-ips-reset-and-import.rsc