Pop-Up Thingie

KC7STW
  • Home
  • Forum
  • Files
  • Log in

  1. Forum
  2. DOVE-Net
  3. Synchronet Discussion
  • Re: Block IPs based on Location

    From Rixter@VERT/RICKSBBS to Wilfred van Velzen on Thu Mar 6 10:57:21 2025
    Hi Compctech,

    On 2025-02-28 10:47:03, you wrote to All:

    Yes you can get the IP block ranges by country at http://www.ipdeny.com/

    For example I do this in a script for some countries (not my fido machine though, because there are a lot of fido systems in russia):

    wget -q -O zone.belarus http://www.ipdeny.com/ipblocks/data/aggregated/by-aggregated.zone
    wget -q -O zone.china http://www.ipdeny.com/ipblocks/data/aggregated/cn-aggregated.zone
    wget -q -O zone.iran http://www.ipdeny.com/ipblocks/data/aggregated/ir-aggregated.zone
    wget -q -O zone.north-korea http://www.ipdeny.com/ipblocks/data/aggregated/kp-aggregated.zone
    wget -q -O zone.russia http://www.ipdeny.com/ipblocks/data/aggregated/ru-aggregated.zone

    After this I feed the files to fail2ban with these commands:

    fail2ban-client restart --unban countries
    fail2ban-client set countries banip $(<zone.north-korea )
    fail2ban-client set countries banip $(<zone.belarus )
    fail2ban-client set countries banip $(<zone.china )
    fail2ban-client set countries banip $(<zone.iran )
    fail2ban-client set countries banip $(<zone.russia )

    And in my fail2ban config (/etc/fail2ban/jail.d/custom.local), I have this section:

    [countries]
    filter = manual
    banaction = %(banaction_allports)s
    bantime = -1
    enabled = true

    Bye, Wilfred.

    --- FMail-lnx64 2.3.2.4-B20240523
    * Origin: FMail development HQ (2:280/464)
    ­ Synchronet ­ Vertrauen ­ Home of Synchronet ­
    [vert/cvs/bbs].synchro.net


    Thanks this worked great. Have a great day.
    Rixter

    telnet://ricksbbs.synchro.net:23
    http://ricksbbs.synchro.net:8080
    Madison,NC

    ---
    ­ Synchronet ­ Rick's BBS telnet://ricksbbs.synchro.net:23
  • Who's Online

  • Recent Visitors

    • Guest
      Wed Aug 12 02:56:02 2026
      from Asd via Telnet
    • Guest
      Tue Mar 10 17:49:41 2026
      from Fdsf via Telnet
    • Guest
      Mon Mar 9 12:13:53 2026
      from Me via Telnet
    • Guest
      Sat Mar 7 10:17:34 2026
      from Hyderabad, Telangana via Telnet
  • System Info

    Sysop: Jason
    Location: Nevada City, CA
    Users: 3
    Nodes: 8 (0 / 8)
    Uptime: 75:22:56
    Calls: 29
    Calls today: 29
    Messages: 24,518
    Posted today: 12

© KC7STW, 2026