Purchase Linux CDs / DVDs / Flash Drives at OSDisc.com

Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd, 2017 please sign up again. Thanks!

Iptables and Ipset blacklist, blocking email and webmail access

Discussion in 'Server Security' started by Alekis, Mar 28, 2018.

  1. Alekis

    Alekis New Member

    Joined:
    Mar 27, 2018
    Messages:
    1
    Likes Received:
    0
    Hi all,

    I have one web server (Linux Ubuntu, Apache, MySql, Plesk), with some sites, and after two invasions, and hundred of invasion attempts, I'm trying to get more ensurance, with iptables and ipset blacklist, following one tutorial that I found in the web.
    Occour that, after to apply the iptables rule below, the server stopped of sending email, via Thunderbird and also via webmail (roundcube).

    The rule is:
    Code:
    iptables -I INPUT -m set --match-set blacklist src -j DROP 
    After that, I tried to correct any possible error using:
    Code:
    iptables -A INPUT -p tcp --dport 25 -j ACCEPT
    iptables -A INPUT -p tcp --dport 110 -j ACCEPT
    iptables -A INPUT -p tcp --dport 143 -j ACCEPT
    iptables -A INPUT -p tcp --dport 587 -j ACCEPT
    iptables -A INPUT -p tcp --dport 943 -j ACCEPT
    
    Until...
    Code:
    iptables -A INPUT -p tcp --dport 80 -j ACCEPT
    (This last, I did as despair, because I'm sure that I don't know, what kind of consequences, can I have.)

    The problem is, that I introduced the rules after the first command, what I'm not sure is correct.

    Also, I would like to ask to the experts the kindness of answer...
    1 - Don't the first rule typed to block just the IPs from the blacklist? So why it blocked the emails for me?
    2 - What can I do, to unblock the e-mail?



    Thank you in advanced,

    Alekis
     
    #1 Alekis, Mar 28, 2018
    Last edited: Mar 28, 2018

Share This Page