PHPMailer not working with Firewall
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
PHPMailer not working with Firewall
On one of My Debian 7 installs, I'm not able to send mails through PHPMailer which sends mails via Google SMTP (regardless of EXIM on server)
If I stop Firewall -- it sends through but not when Firewall is active.
I have ACCEPT for 993,465,25,587 in the Rules.... anything ?
iptables -L
If I stop Firewall -- it sends through but not when Firewall is active.
I have ACCEPT for 993,465,25,587 in the Rules.... anything ?
iptables -L
Code: Select all
Chain INPUT (policy DROP)
target prot opt source destination
fail2ban-VESTA tcp -- anywhere anywhere tcp dpt:8083
fail2ban-MAIL tcp -- anywhere anywhere multiport dports smtp,ssmtp,submission,2525,pop3,pop3s,imap2,imaps
fail2ban-SSH tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:9562
ACCEPT tcp -- anywhere anywhere tcp dpt:5901
ACCEPT tcp -- anywhere anywhere tcp dpt:2257
ACCEPT tcp -- anywhere anywhere tcp dpt:9810
DROP tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere multiport dports http,https
ACCEPT tcp -- anywhere anywhere multiport dports ftp-data,ftp,12000:12100
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere multiport dports smtp,ssmtp,submission,2525
ACCEPT tcp -- anywhere anywhere multiport dports pop3,pop3s
ACCEPT tcp -- anywhere anywhere multiport dports imap2,imaps
DROP tcp -- anywhere anywhere multiport dports mysql,postgresql
DROP tcp -- anywhere anywhere tcp dpt:8083
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- 127.0.0.2 anywhere
ACCEPT all -- rn2g anywhere
ACCEPT all -- localhost.localdomain anywhere
ACCEPT tcp -- anywhere anywhere tcp spt:ftp-data
ACCEPT tcp -- anywhere anywhere tcp spt:ftp
ACCEPT tcp -- anywhere anywhere tcp spt:ssh
ACCEPT tcp -- anywhere anywhere tcp spt:smtp
ACCEPT udp -- anywhere anywhere udp spt:domain
ACCEPT tcp -- anywhere anywhere tcp spt:http
ACCEPT tcp -- anywhere anywhere tcp spt:https
ACCEPT tcp -- anywhere anywhere tcp spt:pop3
ACCEPT udp -- anywhere anywhere udp spt:ntp
ACCEPT tcp -- anywhere anywhere tcp spt:imap2
ACCEPT tcp -- anywhere anywhere tcp spt:mysql
ACCEPT tcp -- anywhere anywhere tcp spt:postgresql
ACCEPT tcp -- anywhere anywhere tcp spt:http-alt
ACCEPT tcp -- anywhere anywhere tcp spt:8433
ACCEPT tcp -- anywhere anywhere tcp spt:8083
ACCEPT udp -- google-public-dns-a.google.com anywhere udp spt:domain state ESTABLISHED
ACCEPT tcp -- google-public-dns-a.google.com anywhere tcp spt:domain state ESTABLISHED
ACCEPT udp -- google-public-dns-b.google.com anywhere udp spt:domain state ESTABLISHED
ACCEPT tcp -- google-public-dns-b.google.com anywhere tcp spt:domain state ESTABLISHED
Re: PHPMailer not working with Firewall
Code: Select all
/etc/init.d/iptables-persistent restart
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: PHPMailer not working with Firewall
isn't that a CentOS command ? I'm on Debian7skurudo wrote:?Code: Select all
/etc/init.d/iptables-persistent restart
Code: Select all
ah@2yg:~$ /etc/init.d/iptables-persistent restart
-bash: /etc/init.d/iptables-persistent: No such file or directory
Re: PHPMailer not working with Firewall
iptables -A OUTPUT -p tcp --dport 25 -j ACCEPT
iptables save
iptables save
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: PHPMailer not working with Firewall
doesn't help.
I think IP Tables are screwed.
I tested on CentOS with Firewall enabled, it works -
I think Vesta's Scripts do not configure Firewall properly on Debian systems.
I think IP Tables are screwed.
I tested on CentOS with Firewall enabled, it works -
I think Vesta's Scripts do not configure Firewall properly on Debian systems.
Re: PHPMailer not working with Firewall
Try to flush iptables and make you own rules
Re: PHPMailer not working with Firewall
put the rules in the custom.sh file and restart the firewall using vesta commands.
Should work.
Should work.