View previous topic :: View next topic |
Author |
Message |
Xide n00b
Joined: 05 Dec 2014 Posts: 5
|
Posted: Fri Dec 05, 2014 10:33 am Post subject: [SOLVED] Postfix SMTP server unreachable outside of LAN |
|
|
Hello,
I'm trying to setup postfix on my dedicated server, the daemon is running and working ( i can send mails from command line when i' ssh'd on the server ) but i from outside i can't see the open SMTP port.
postconf -n:
Code: | command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
home_mailbox = maildir/
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
local_recipient_maps =
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = my_url.com
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
relay_domains = $mydomain
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550 |
And the output of nmap:
From LAN:
Code: | Host is up (0.0000090s latency).
Not shown: 992 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
53/tcp open domain
80/tcp open http
443/tcp open https
3000/tcp open ppp |
From outside:
Code: | Host is up (0.043s latency).
Not shown: 990 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
53/tcp open domain
80/tcp open http
135/tcp filtered msrpc
139/tcp filtered netbios-ssn
443/tcp open https
445/tcp filtered microsoft-ds
3000/tcp open ppp |
Same for ping and telnet, i can reach my HTTP server but not the SMTP.
I can't paste postfix log ( dont really know why but they are not generated )
Can someone see why this is happening, and how to fix it ?
Thanks in advance.
Last edited by Xide on Tue Dec 09, 2014 9:43 am; edited 1 time in total |
|
Back to top |
|
|
py-ro Veteran
Joined: 24 Sep 2002 Posts: 1734 Location: Velbert
|
Posted: Fri Dec 05, 2014 10:42 am Post subject: |
|
|
Did you start the postfix service? |
|
Back to top |
|
|
Xide n00b
Joined: 05 Dec 2014 Posts: 5
|
Posted: Fri Dec 05, 2014 10:48 am Post subject: |
|
|
yes, sure.
postfix status:
Code: | postfix/postfix-script: the Postfix mail system is running: PID: 4736
|
|
|
Back to top |
|
|
py-ro Veteran
Joined: 24 Sep 2002 Posts: 1734 Location: Velbert
|
Posted: Fri Dec 05, 2014 11:04 am Post subject: |
|
|
netstat -tlpn?
Content of master.cf? |
|
Back to top |
|
|
Xide n00b
Joined: 05 Dec 2014 Posts: 5
|
Posted: Fri Dec 05, 2014 12:15 pm Post subject: |
|
|
netstat:
Code: | Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 11856/nginx: master
tcp 0 0 188.165.194.223:53 0.0.0.0:* LISTEN 24833/named
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 8747/pure-ftpd (SER
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 8492/named
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 17685/sshd
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 16986/ruby20
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 4736/master
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 8492/named
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 11856/nginx: master
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 2144/php-fpm: maste
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 7433/mysqld
tcp6 0 0 :::21 :::* LISTEN 8747/pure-ftpd (SER
tcp6 0 0 ::1:53 :::* LISTEN 8492/named
tcp6 0 0 :::22 :::* LISTEN 17685/sshd |
master.cf:
Code: | # ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
#628 inet n - n - - qmqpd
pickup unix n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr unix n - n 300 1 qmgr
#qmgr unix n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
|
|
|
Back to top |
|
|
py-ro Veteran
Joined: 24 Sep 2002 Posts: 1734 Location: Velbert
|
Posted: Fri Dec 05, 2014 12:53 pm Post subject: |
|
|
netstat shows an open smtp Port, so most probably you have some iptables rules in place. |
|
Back to top |
|
|
Xide n00b
Joined: 05 Dec 2014 Posts: 5
|
Posted: Fri Dec 05, 2014 1:28 pm Post subject: |
|
|
I have already looked at that, my iptables seems empty :/
iptables -L :
Code: | 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 |
|
|
Back to top |
|
|
py-ro Veteran
Joined: 24 Sep 2002 Posts: 1734 Location: Velbert
|
Posted: Fri Dec 05, 2014 1:42 pm Post subject: |
|
|
Maybe on the router? |
|
Back to top |
|
|
papahuhn l33t
Joined: 06 Sep 2004 Posts: 626
|
Posted: Fri Dec 05, 2014 8:19 pm Post subject: |
|
|
I can reach your SMTP. _________________ Death by snoo-snoo! |
|
Back to top |
|
|
Xide n00b
Joined: 05 Dec 2014 Posts: 5
|
Posted: Tue Dec 09, 2014 9:43 am Post subject: |
|
|
My bad, the problem was on my router ><
Thanks for your help ! |
|
Back to top |
|
|
|