Ban an IP address from send mail to my server

Discussion in 'Installation/Configuration' started by Westhauz, Feb 24, 2016.

  1. Westhauz

    Westhauz New Member

    Hi I would like to create a global rule to ban an IP address (or domain) from sending mail or trying to connect to my server.
    How would I do this.
    Kind Regards

    Attached Files:

  2. Well-Known Member HowtoForge Supporter

    looks annoying, I'd probably just firewall that IP completely by using something like
    $iptables -A INPUT -s -j DROP
  3. Westhauz

    Westhauz New Member

    Hi thanks for prompt reply .....
    Where will I do this ..... Kind Regards
  4. Well-Known Member HowtoForge Supporter

  5. sjau

    sjau Local Meanie Moderator

    You could save the iptables rules by cron every xx hour or something or once a day:
    Save the rules:
    iptables-save > /root/iptables.rules
    Upon reboot restore them:
    iptables-restore < /root/iptables.rules

Share This Page