Related Threads:
The problem
I have a server running Debian 3.2.65-1 and i am having some problems to connect other server to send emails through SMTP in a web app based on Drupal.
The first thing i've done is ckecking the server with telnet and the result is the following message.
Command Line syntax:
telnet smtp.mydomain.com 587
Result:
Trying XXX.XXX.XX.XXX...
telnet: Unable to connect to remote host: Connection timed out
After googling and reading some posts about different solutions:
- I can connect from other different machines to the SMTP server. So i discard the SMTP server as origin of the problem.
- The statement on 1 makes me think that it is a firewall problem. Then, I've checked iptables.
Command Line syntax:
iptables -L
Result:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
I understand that the server is open and it has the default configuration with no rules.
- I've found that the server has UFW, but it is not running.
- Following the advice of kasperd in comments: 3rd comment
netstat -ntlp
result:
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:36990 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:6082 0.0.0.0:* LISTEN -
tcp6 0 0 :::111 :::* LISTEN -
tcp6 0 0 :::8080 :::* LISTEN -
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 :::46645 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 :::443 :::* LISTEN -
tcp6 0 0 ::1:6082 :::* LISTEN -
Any ideas how can i fix it ?