Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Postfix SMTP server unreachable outside of LAN
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Xide
n00b
n00b


Joined: 05 Dec 2014
Posts: 5

PostPosted: Fri Dec 05, 2014 10:33 am    Post subject: [SOLVED] Postfix SMTP server unreachable outside of LAN Reply with quote

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
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1733
Location: St. Wendel

PostPosted: Fri Dec 05, 2014 10:42 am    Post subject: Reply with quote

Did you start the postfix service?
Back to top
View user's profile Send private message
Xide
n00b
n00b


Joined: 05 Dec 2014
Posts: 5

PostPosted: Fri Dec 05, 2014 10:48 am    Post subject: Reply with quote

yes, sure.
postfix status:
Code:
postfix/postfix-script: the Postfix mail system is running: PID: 4736
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1733
Location: St. Wendel

PostPosted: Fri Dec 05, 2014 11:04 am    Post subject: Reply with quote

netstat -tlpn?

Content of master.cf?
Back to top
View user's profile Send private message
Xide
n00b
n00b


Joined: 05 Dec 2014
Posts: 5

PostPosted: Fri Dec 05, 2014 12:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1733
Location: St. Wendel

PostPosted: Fri Dec 05, 2014 12:53 pm    Post subject: Reply with quote

netstat shows an open smtp Port, so most probably you have some iptables rules in place.
Back to top
View user's profile Send private message
Xide
n00b
n00b


Joined: 05 Dec 2014
Posts: 5

PostPosted: Fri Dec 05, 2014 1:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1733
Location: St. Wendel

PostPosted: Fri Dec 05, 2014 1:42 pm    Post subject: Reply with quote

Maybe on the router?
Back to top
View user's profile Send private message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 623

PostPosted: Fri Dec 05, 2014 8:19 pm    Post subject: Reply with quote

I can reach your SMTP.
_________________
Death by snoo-snoo!
Back to top
View user's profile Send private message
Xide
n00b
n00b


Joined: 05 Dec 2014
Posts: 5

PostPosted: Tue Dec 09, 2014 9:43 am    Post subject: Reply with quote

My bad, the problem was on my router ><
Thanks for your help !
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum