Results 1 to 7 of 7

Thread: block_ip.sh block IPs through DirectAdmin?

  1. #1
    Join Date
    Nov 2005
    Location
    USA
    Posts
    228

    Smile block_ip.sh block IPs through DirectAdmin?

    Hi,


    block_ip.sh so I can block IPs through DirectAdmin

    this for iptables

    http://help.directadmin.com/item.php?id=380


    please share script for IPFW Firewall



    Thank in advance

  2. #2
    Join Date
    Jun 2009
    Posts
    557
    ipfw add deny all from <ip-here> to me

  3. #3
    Join Date
    Nov 2005
    Location
    USA
    Posts
    228
    Hello

    can add to block_ip.sh?

    please provide instruction

    thank you

  4. #4
    Join Date
    Nov 2011
    Posts
    2

    scripting block_ip.sh on freebsd

    Hi,

    You just create the file block_ip.sh in the given directory

    /usr/local/directadmin/scripts/custom/

    Put this in it:

    #!/bin/sh
    echo "Blocking $ip with ipfw ...<br>";
    ipfw add deny ip from $ip to any
    exit $?

    and now you should have a Block this IP button.
    You find the button in Brute Force Monitor, when you click "IP Info".

    Note that if IPFW gets restarted the IP is no longer blocked.
    Hope that helps!


    Does anybody know how to change this script so it writes the rule to /etc/firewall.rules ?(so blocked IP's are saved)

    What i've tried is

    #!/bin/sh
    echo "Blocking $ip with ipfw ...<br>";
    add deny ip from $ip to any >> /etc/firewall.rules
    exit $?


    But i get an error and the file is not amended.
    Any ideas anyone?

  5. #5
    Join Date
    May 2005
    Location
    Montreal, QC, Canada
    Posts
    110
    Hi, I have created a HOWTO to have FreeBSD, BFM and IPFW work together.
    FreeBSD <3

  6. #6
    Join Date
    Nov 2003
    Location
    nethetlands
    Posts
    27
    How i can let the scripts work under debian 6?

  7. #7
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    12,121

Similar Threads

  1. Replies: 57
    Last Post: 07-06-2018, 09:20 PM
  2. One easy question about block_ip.sh
    By glio in forum General Technical Discussion & Troubleshooting
    Replies: 9
    Last Post: 01-28-2013, 12:15 AM
  3. Why does block_ip.sh work but brute_force_notice_ip.sh does not?
    By donkeyKICK in forum General Technical Discussion & Troubleshooting
    Replies: 5
    Last Post: 11-30-2011, 08:57 PM
  4. How to block the uploading some extension on directadmin server
    By megatron in forum Admin-Level Difficulties
    Replies: 1
    Last Post: 11-07-2011, 01:41 AM
  5. Email security - How to block spam going out from DirectAdmin server
    By Alanng in forum General Technical Discussion & Troubleshooting
    Replies: 1
    Last Post: 01-15-2010, 07:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •