Configuring IPTables for a mail server

Discussion in 'Server Operation' started by CarbonCopy, Apr 25, 2010.

  1. CarbonCopy

    CarbonCopy New Member

    I'm configuring iptables, and I run a webserver, FTP, and SMTP/IMAP. I got the web server and FTP working, and I can login and send an email. However, it doesn't look like the email gets sent to the remote host. any ideas?

    Code:
    # Generated by iptables-save v1.3.5 on Sun Apr 25 14:00:25 2010
    *filter
    :INPUT DROP [1971:132253]
    :FORWARD DROP [0:0]
    :OUTPUT DROP [179:12338]
    -A INPUT -p tcp -m tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
    -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT
    -A INPUT -p tcp -m tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT
    -A INPUT -p tcp -m tcp --dport 143 -m state --state NEW,ESTABLISHED -j ACCEPT
    -A INPUT -p tcp -m tcp --dport 993 -m state --state NEW,ESTABLISHED -j ACCEPT
    -A INPUT -p tcp -m tcp --dport 25 -m state --state NEW,ESTABLISHED -j ACCEPT
    -A INPUT -p tcp -m tcp --dport 465 -m state --state NEW,ESTABLISHED -j ACCEPT
    -A INPUT -p tcp -m tcp --dport 26 -m state --state NEW,ESTABLISHED -j ACCEPT
    -A INPUT -p udp -m udp --sport 53 -m state --state ESTABLISHED -j ACCEPT
    -A OUTPUT -p tcp -m tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT
    -A OUTPUT -p tcp -m tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT
    -A OUTPUT -p tcp -m tcp --sport 443 -m state --state ESTABLISHED -j ACCEPT
    -A OUTPUT -p tcp -m tcp --sport 143 -m state --state ESTABLISHED -j ACCEPT
    -A OUTPUT -p tcp -m tcp --sport 993 -m state --state ESTABLISHED -j ACCEPT
    -A OUTPUT -p tcp -m tcp --sport 25 -m state --state ESTABLISHED -j ACCEPT
    -A OUTPUT -p tcp -m tcp --sport 465 -m state --state ESTABLISHED -j ACCEPT
    -A OUTPUT -p tcp -m tcp --sport 26 -m state --state ESTABLISHED -j ACCEPT
    -A OUTPUT -p udp -m udp --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT
    COMMIT
    # Completed on Sun Apr 25 14:00:25 2010
    # Generated by iptables-save v1.3.5 on Sun Apr 25 14:00:25 2010
    *mangle
    :PREROUTING ACCEPT [20857:2424246]
    :INPUT ACCEPT [20857:2424246]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [17245:13552334]
    :POSTROUTING ACCEPT [17066:13539996]
    COMMIT
    # Completed on Sun Apr 25 14:00:25 2010
    # Generated by iptables-save v1.3.5 on Sun Apr 25 14:00:25 2010
    *nat
    :PREROUTING ACCEPT [3167:181252]
    :POSTROUTING ACCEPT [165:11576]
    :OUTPUT ACCEPT [315:20368]
    COMMIT
    # Completed on Sun Apr 25 14:00:25 2010
    
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Any errors in your mail log?
     

Share This Page