The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

server can't receive any mail when IPtables start.

Discussion in 'E-mail Discussions' started by Jedia, Jun 26, 2004.

  1. Jedia

    Jedia Well-Known Member

    Joined:
    Mar 18, 2004
    Messages:
    200
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    CN
    hi, i have open ports all Cpanel/WHM wanted, but my server can't receive any mail from outside.
    my exim use port 25
    does any other ports needed for receive mails?
    Thanks!
    my server opend ports:
    20 21 22 25 26 37 43 53 80 110 113 143 443 465 873 993 995 2082 2083 2086 2087 2089 2095 2096
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Do you have port 25 IN and OUT open?
     
  3. Jedia

    Jedia Well-Known Member

    Joined:
    Mar 18, 2004
    Messages:
    200
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    CN
    sir, i don't anything about iptables, please tell me how to setup iptable for the server , thanks:D
     
  4. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    So you are saying if iptables is stopped your email works then?
     
  5. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    If you have blocked inbound SMTP via iptables, then you need to issue the following command:

    iptables -A INPUT -p tcp --dport 25 -j ACCEPT
     
  6. Jedia

    Jedia Well-Known Member

    Joined:
    Mar 18, 2004
    Messages:
    200
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    CN
    thanks to everyone.
    hello SarcNBit, would you please tell me how to setup the iptables? :D this is the config file on /etc/sysconfig/iptables
    now i start iptables run
    /etc/rc.d/init.d/iptables start
    then what command i must run , thank you very much :D
     
  7. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    Your config looks like it should work to accept mail.

    You can try issuing the following command (basically what you have minus the state information):

    iptables -I RH-Firewall-1-INPUT 1 -p tcp --dport 25 -j ACCEPT

    I used to refer people to the iptables man page for more information, but now I direct people to this excellent web page I found (man pages are still excellent resources :) ).
     
  8. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Thanks SarcNBit.
    Best resource I have seen yet for iptables.
     
  9. Jedia

    Jedia Well-Known Member

    Joined:
    Mar 18, 2004
    Messages:
    200
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    CN
    Thanks SarcNBit.:D
    i use the redhat config to rebuild the config file, this will accept all ports.
     
Loading...

Share This Page