Check if the localhost port is enabled
It is obvious that the service has been enabled, but it cannot be used. You need to check whether the port is enabled. netstat command
Options:
-r list routing table
-n do not perform ip and host resolution
-a list all link states
-t tcp
-in udp
-l listen
-p list filenames of pid and program
[root@www ~]# netstat -tulnp | grep 1187
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 1187/smbd
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 1187/smbd
tcp 0 0 :::139 :::* LISTEN 1187/smbd
tcp 0 0 :::445 :::* LISTEN 1187/smbd
Use the telnet command to check whether the local port is enabled
[root@www ~]# telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 www.localdomain ESMTP Postfix
^]
telnet> quit
Connection closed.
Detecting whether the remote host port is open is also the telnet command
[root@www ~]# telnet 10.107.230.18 80
Trying 10.107.230.18...
Connected to 10.107.230.18.
Escape character is '^]'.
^]
telnet> quit
Connection closed