Install nmap and check which ports are open.Centos 7

yum install nmap

now scan the ports with :

nmap -sT -O localhost


Nmap scan report for localhost (

Host is up (0.000083s latency).

rDNS record for localhost.localdomain

Not shown: 972 closed ports


21/tcp    open  ftp

22/tcp    open  ssh

25/tcp    open  smtp

53/tcp    open  domain

80/tcp    open  http

110/tcp   open  pop3

111/tcp   open  rpcbind

143/tcp   open  imap

443/tcp   open  https

783/tcp   open  spamassassin

993/tcp   open  imaps

995/tcp   open  pop3s

1080/tcp  open  socks

1081/tcp  open  pvuniwien

2005/tcp  open  deslogin

2009/tcp  open  news

3005/tcp  open  deslogin

3306/tcp  open  mysql

5432/tcp  open  postgresql

8009/tcp  open  ajp13

8080/tcp  open  http-proxy

8081/tcp  open  blackice-icecap

9009/tcp  open  pichat

9080/tcp  open  glrpc

9090/tcp  open  zeus-admin

9100/tcp  open  jetdirect

10024/tcp open  unknown

10025/tcp open  unknown

No exact OS matches for host (If you know what OS is running on it, see ).

TCP/IP fingerprint:











Network Distance: 0 hops

OS detection performed. Please report any incorrect results at .

Nmap done: 1 IP address (1 host up) scanned in 12.22 seconds

now scan from external :

nmap -sT -O <ip>


Starting Nmap 7.50 ( ) at 2017-07-23 09:30 CEST

Nmap scan report for (<ip>)

Host is up (0.035s latency).

rDNS record for <ip>: mail.

Not shown: 978 closed ports


21/tcp   open     ftp

22/tcp   open     ssh

25/tcp   open     smtp

53/tcp   open     domain

80/tcp   open     http

110/tcp  open     pop3

111/tcp  open     rpcbind

135/tcp  filtered msrpc

139/tcp  filtered netbios-ssn

143/tcp  open     imap

443/tcp  open     https

445/tcp  filtered microsoft-ds

993/tcp  open     imaps

995/tcp  open     pop3s

1080/tcp open     socks

1081/tcp open     pvuniwien

2009/tcp open     news

3306/tcp filtered mysql

8009/tcp open     ajp13

8081/tcp open     blackice-icecap

9009/tcp open     pichat

9080/tcp open     glrpc

Device type: general purpose|media device|WAP|storage-misc

Running (JUST GUESSING): Linux 3.X|4.X|2.6.X (89%), Asus embedded (86%), Synology DiskStation Manager 5.X (86%)

OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:3.x cpe:/h:asus:rt-n56u cpe:/o:linux:linux_kernel:3.4 cpe:/o:linux:linux_kernel:3.10 cpe:/a:synology:diskstation_manager:5.2 cpe:/o:linux:linux_kernel:2.6.32

Aggressive OS guesses: Linux 3.2 – 4.8 (89%), Linux 3.18 (88%), Linux 3.16 (87%), Linux 3.13 or 4.2 (87%), XBMCbuntu Frodo v12.2 (Linux 3.X) (87%), ASUS RT-N56U WAP (Linux 3.4) (86%), Linux 3.13 (86%), Linux 3.12 (86%), Linux 3.8 – 3.11 (86%), Linux 4.10 (86%)

No exact OS matches for host (test conditions non-ideal).

Network Distance: 6 hops

OS detection performed. Please report any incorrect results at .

Nmap done: 1 IP address (1 host up) scanned in 15.47 seconds


check now for LISTENING port:

Next, check for information about the port using netstat or lsof. To check for port 834 using netstat, use the following command:

netstat -anp | grep 834

result :

tcp        0      0         TIME_WAIT                      

unix  2      [ ACC ]     STREAM     LISTENING     397083455 343/amavisd (ch1-av  /var/spool/amavisd/amavisd.sock

unix  2      [ ]         STREAM     CONNECTED     481728342 25062/ruby           

unix  3      [ ]         STREAM     CONNECTED     407881834 4920/dovecot         

unix  2      [ ]         STREAM     CONNECTED     481808349 25062/ruby   

The lsof command reveals similar information since it is also capable of linking open ports to services:

lsof -i | grep 834

To check if the port is associated with the official list of known services, type:

cat /etc/services


to check the users log in use command : who

Problem Restarting Apache

[Fri Mar 31 04:44:20.842898 2017] [:error] [pid 25467] (28)No space left on device: mod_python: Failed to create global mutex 2 of 8 (/tmp/mpmtx254672).

[Fri Mar 31 04:44:20.842912 2017] [:error] [pid 25467] mod_python: We can probably continue, but with diminished ability to process session locks.

[Fri Mar 31 04:44:20.842914 2017] [:error] [pid 25467] mod_python: Hint: On Linux, the problem may be the number of available semaphores, check ‘sysctl kernel.sem’

[Fri Mar 31 04:44:20.868130 2017] [mpm_prefork:notice] [pid 25467] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 PHP/5.6.30 mod_python/3.5.0- Python/2.7.5 mod_jk/1.2.42 configured — resuming normal operations

To solve :

This error completely stumped me a couple of weeks ago. Apparently someone was adjusting the Apache configuration, then they checked their syntax and attempted to restart Apache. It went down without a problem, but it refused to start properly, and didn’t bind to any ports.

Within the Apache error logs, this message appeared over and over:

Apache is basically saying “I want to start, but I need to write some things down before I can start, and I have nowhere to write them!” If this happens to you, check these items in order:

1. Check your disk space
This comes first because it’s the easiest to check, and sometimes the quickest to fix. If you’re out of disk space, then you need to fix that problem. 🙂

2. Review filesystem quotas
If your filesystem uses quotas, you might be reaching a quota limit rather than a disk space limit. Use repquota / to review your quotas on the root partition. If you’re at the limit, raise your quota or clear up some disk space. Apache logs are usually the culprit in these situations.

3. Clear out your active semaphores
Semaphores? What the heck is a semaphore? Well, it’s actually an apparatus for conveying information by means of visual signals. But, when it comes to programming, semaphores are used for communicating between the active processes of a certain application. In the case of Apache, they’re used to communicate between the parent and child processes. If Apache can’t write these things down, then it can’t communicate properly with all of the processes it starts.

I’d assume if you’re reading this article, Apache has stopped running. Run this command as root:

If you see a list of semaphores, Apache has not cleaned up after itself, and some semaphores are stuck. Clear them out with this command:

Now, in almost all cases, Apache should start properly. If it doesn’t, you may just be completely out of available semaphores. You may want to increase your available semaphores, and you’ll need to tickle your kernel to do so. Add this to /etc/sysctl.conf:

And then run sysctl -p to pick up the new changes.

Restart : service httpd restart