Ban IP adress

Discussion in 'Installation/Configuration' started by Lucav87, Dec 18, 2015.

  1. Lucav87

    Lucav87 New Member HowtoForge Supporter

    Hello,
    I need the banner of an IP address, but when I do
    iptables -A INPUT -s xxx.xxx.xxx.xxx -j DROP
    and then reboot the server was not saved the rule ... how can I fix?

    thank you

    Luca
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can add the command in /etc/rc.local file so it gets executed after reboot again.
     
  3. Lucav87

    Lucav87 New Member HowtoForge Supporter

    Code:
    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    iptables -A INPUT -s xxx.xxx.xxx.xxx -j DROP
    exit 0 
    Thanks for the reply
    like this? :)
     

Share This Page