Solve CSF Firewall issue with port blocking

gmail_smtp_settingsDays ago when moving one of production web system to a new node, we accidentally faced a problem of sending email using Gmail SMTP server. After some debugging the problem, I found that there is a problem on port blocking with IP v6. So I post here an article to guide how to solve CSF Firewall issue with port blocking.

  • First, if the application cannot sending email using Google SMTP server (smtp.gmail.com with port 465 – SSL or 587 – TLS), check if the configuration information is correct.
  • Then, if you are using free google apps, check if you already exceeded 99 out-sending email per day for that day. Please be noted that this restriction is applied for free Goolge apps account and will be reset after 24 hours.
  • In case the debugging information show that connection is timed out, check on the website that we can access gmail.com and smtp.gmail.com.
  • Then, try connecting to the target address via telnet ([bash]telnet smtp.gmail.com 465[/bash]

    or

    [bash]telnet smtp.gmail.com 465[/bash]

    ).

  • If telnet give connection timeout error, check if we already open port in CSF (check in/etc/csf/csf.conf). Major note is here 😉
    • Be sure port is opened on TCP_OUT.
    • However, some new server infrastructure utilizes IPv6, so, be sure to check TCP6_OUT also.
  • Restart CSF firewall to see its affect:[bash]csf -r[/bash]

Similar Posts

  • CentOS 7 workaround

    Switching from CentOS 6 to CentOS 7 might be a little pain for many users. The main reason is that in CentOS 7, there are several changes which make the end-users feel not comfortable.  This quick note will introduce some new way to do some regular commands in CentOS 7. 1. Using systemctl In CentOS 6,…

  • Backup Proxmox with NFS

    Well, there are plenties of online tutorials about proxmox and backup itself, however, there is really difficult to find a working one with NFS installation, configuration and make it work with Proxmox. So I decide to add a short tutorial on how to backup proxmox with nfs. Install NFS on remote storage server In this case,…

  • Install Apache Solr on CentOS 6

    Solr is the popular, blazing fast open source enterprise search platform from the Apache LuceneTM project. Its major features include powerful full-text search, hit highlighting, faceted search, near real-time indexing, dynamic clustering, database integration, rich document (e.g., Word, PDF) handling, and geospatial search. Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication…

  • How to add a new IP range to Citrix XenServer?

    When running out of current assigned IP ranges, you will need to add a new IP range to Citrix XenServer before can assigning it to specific VMs. This tutorial contains step-by-step guide on this work. The following work will be done in the main server which hosts Citrix XenServer. When requesting additional IPs you should specifically…

2 Comments

  1. i am facing this problem with no solution,
    port 465 & 587 r open in TCP_OUT, TCP_IN, UDP_OUT, TCP6_IN, TCP6_OUT, UDP6_OUT. (hav check in/etc/csf/csf.conf)
    Still SMTP not working in any application such as wordpress, joomla, etc.
    Before few months ago it was working perfectly but after some update of CFS, this problem is started.

    When i disable Firewall CFS, SMTP email start going without any error.
    when i enable CFS it stop sending SMTP emails.

    i able to connect “telnet smtp.gmail.com 465” with firewall ON.
    is there any solution ?
    Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *