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.

SquirrelMail & iptables

Discussion in 'E-mail Discussions' started by Stanleytiew, Jul 9, 2005.

  1. Stanleytiew

    Stanleytiew Well-Known Member

    Joined:
    May 9, 2005
    Messages:
    143
    Likes Received:
    0
    Trophy Points:
    16
    I having some problem with squirrelmail failed to send email, however when I run "service iptables stop" squirrelmail will be able to send email very well. Did anybody encounter the same problem before? Please let me know what will happen when iptables is stopped, will it effect the security of the server?
     
  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
    Your iptables firewall is probably blocking outbound port 25. As to stopping iptables, whether it will affect security depends on whether you have actually configured a firewall. If not, then you're as vulnerable whether you start it or not. If you have, then the issue should be obvious.
     
  3. Stanleytiew

    Stanleytiew Well-Known Member

    Joined:
    May 9, 2005
    Messages:
    143
    Likes Received:
    0
    Trophy Points:
    16
    Can you please guide me on how to enable port 25 in firewall so my squirrelmail will not have any problem.
     
  4. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Hello,

    Could you please try this commands
    --------------------------------------------------------------------------

    iptables -A OUTPUT -p tcp -i eth0 --dport 25 -j ACCEPT
    iptables -A OUTPUT -p udp -i eth0 --dport 25 -j ACCEPT

    iptables -A FORWARD -p tcp -i eth0 --dport 25 -j ACCEPT
    iptables -A FORWARD -p udp -i eth0 --dport 25 -j ACCEPT
    --------------------------------------------------------------------------

    Let me know the status ;)
     
  5. Stanleytiew

    Stanleytiew Well-Known Member

    Joined:
    May 9, 2005
    Messages:
    143
    Likes Received:
    0
    Trophy Points:
    16
    get the following error message:

    iptables v1.2.8: Can't use -i with OUTPUT.
     
  6. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Oops!!,

    I am sorry, I didn't notice that.

    For OUTPUT the -i should be changed to -o

    Please try this
    --------------------------------------------------------------------------

    iptables -A OUTPUT -p tcp -o eth0 --dport 25 -j ACCEPT
    iptables -A OUTPUT -p udp -o eth0 --dport 25 -j ACCEPT

    iptables -A FORWARD -p tcp -i eth0 --dport 25 -j ACCEPT
    iptables -A FORWARD -p udp -i eth0 --dport 25 -j ACCEPT
    --------------------------------------------------------------------------

    Let me know the status
     
  7. Stanleytiew

    Stanleytiew Well-Known Member

    Joined:
    May 9, 2005
    Messages:
    143
    Likes Received:
    0
    Trophy Points:
    16
    SquirrelMail still failed to send email with iptables start. Don't know what go wrong, maybe I do it not the correct way. Anyway if iptables stop squirrelmail is working. I type all the command given on the root, is this the right way?
     
Loading...

Share This Page