Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated using 4PSA automated script

...

 It is assumed that you are using a CentOS server with iptables already installed.

  1. Download the script.

    Shell

     wget -O blockcountry.pl https://raw.githubusercontent.com/4psa/voipnowtoolbox/master/blockcountry.pl


  2. Install the LWP::UserAgent library using the following command: 

    Shell

    yum install perl-libwww-perl


  3. Edit the blockcountry.pl script and specify the countries that you want to block. The list of countries is available here

    e.g. The code for Palestina is PS. For Turkey, it's TR.

  4. Run the blockcountry.pl script: 

    Shell

    perl blockcountry.pl


  5. To preserve the rules during reboots, run the following comand: 

    Shell

    service iptables save && chkconfig iptables on


Note

Make sure you do not mix the countries, otherwise you might get yourself blocked.

To avoid such issues, it is recommended to start with a cronjob that will remove the rules in order to avoid issues. If no issues arise, the cronjob can be removed.

...

Content by Label
showSpace
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@5d4a10c14PSAKB
showSpacefalse
sortmodified
falsereversetrue
typepage
labelsattacks brute-force fraud block voipnow countries server access
cqllabel in ("server","block","access","brute-force","voipnow","attacks","fraud","countries") and type = "page" and space = "4PSAKB"

...

hiddentrue

...

currentSpace()
labelsattacks brute-force fraud block voipnow countries server access

Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.