Postfix

防火牆配置為允許 25/tcp 但仍無法通過該埠遠端登錄到伺服器

  • March 29, 2016

對於通常的郵件協議,我在埠 25、110、587、465、993、995 上執行了 postfix 和 dovecot。我可以遠端登錄到除埠 25 之外的所有埠,您可以在下面看到。關於發生了什麼的任何想法?

遠端 Telnet 到埠 25(失敗)

# telnet 192.168.1.100 25
Trying 192.168.1.100 ...
telnet: connect to address 192.168.1.100: Operation timed out
telnet: Unable to connect to remote host

本地 Telnet 到埠 25(成功)

# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 example.com.au ESMTP Postfix

防火牆規則:

# firewall-cmd --list-all
public (default, active)
 interfaces: eth0
 sources:
 services: dhcpv6-client dns http https imaps pop3s smtp ssh
 ports: 110/tcp 465/tcp 5432/tcp 587/tcp 143/tcp 2288/tcp 25/tcp
 masquerade: no
 forward-ports:
 icmp-blocks:
 rich rules:

我的後綴main.cf

inet_interfaces = $myhostname, localhost 

ss -plnt |grep :25返回

LISTEN     0      100                       *:25                       *:*      users:(("master",30844,13))
LISTEN     0      100                      :::25                      :::*      users:(("master",30844,14))

檢查您的工作站防火牆。我可以連接到您的後綴“telnet 192.168.1.100 25”

引用自:https://serverfault.com/questions/766698