发表于 2013-5-24 10:51 | 来自
51CTO网页
引用:原帖由 dn833 于 2013-5-24 08:17 发表
netstat -tpln
iptables -vnL
getenforce
结果发上来看看结果是:
[root@onion ~]# telnet 192.168.189.129 25
Trying 192.168.189.129...
telnet: connect to address 192.168.189.129: Connection refused
过程:
[root@onion ~]# netstat -an|grep 25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 192.168.189.129:49025 74.125.227.129:80 ESTABLISHED
tcp 0 0 ::1:25 :::* LISTEN
[root@onion ~]# service postfix restart
Shutting down postfix: [ OK ]
Starting postfix: [ OK ]
[root@onion ~]# netstat -tpln
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:60004 0.0.0.0:* LISTEN 2837/db2sysc 0
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2069/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1934/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 16335/master
tcp 0 0 :::22 :::* LISTEN 2069/sshd
tcp 0 0 :::23 :::* LISTEN 1033/xinetd
tcp 0 0 ::1:631 :::* LISTEN 1934/cupsd
tcp 0 0 ::1:25 :::* LISTEN 16335/master
[root@onion ~]# iptables -vnL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
[root@onion ~]# getenforce
Enforcing
[root@onion ~]# chkconfig --list|grep postfix --color=yes
postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@onion ~]# service postfix restart
Shutting down postfix: [ OK ]
Starting postfix: [ OK ]
[root@onion ~]# netstat -tpln
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:60004 0.0.0.0:* LISTEN 2837/db2sysc 0
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2069/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1934/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 16663/master
tcp 0 0 :::22 :::* LISTEN 2069/sshd
tcp 0 0 :::23 :::* LISTEN 1033/xinetd
tcp 0 0 ::1:631 :::* LISTEN 1934/cupsd
tcp 0 0 ::1:25 :::* LISTEN 16663/master
[root@onion ~]# iptables -vnL
Chain INPUT (policy ACCEPT 408 packets, 31054 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 115 packets, 13496 bytes)
pkts bytes target prot opt in out source destination
[root@onion ~]# getenforce
Enforcing
[root@onion ~]# service postfix status
master (pid 16663) is running...
[root@onion ~]# telnet 192.168.189.129 25
Trying 192.168.189.129...
telnet: connect to address 192.168.189.129: Connection refused