Check network port is open or not on CentOS 7

CK CK 3788 
Created at
Updated at  
1,196 0 0

To check listening port on CentOS 7, you can do it by "netstat" simply, or you can try it by "ss". I was easily able to check which port is open or not on CentOS 7.

# netstat -tulnp

The above shows its result like below:

# netstat -tulnp
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:25              0.0.0.0:*               LISTEN      2755/master
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      2104/redis-server 1
tcp        0      0 0.0.0.0:11211           0.0.0.0:*               LISTEN      2086/memcached
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2088/sshd
tcp6       0      0 :::25                   :::*                    LISTEN      2755/master
tcp6       0      0 :::8090                 :::*                    LISTEN      29399/java
tcp6       0      0 :::28090                :::*                    LISTEN      4248/java
tcp6       0      0 :::443                  :::*                    LISTEN      25560/httpd
tcp6       0      0 :::28091                :::*                    LISTEN      4766/java
tcp6       0      0 127.0.0.1:8000          :::*                    LISTEN      29399/java
tcp6       0      0 127.0.0.1:28000         :::*                    LISTEN      4248/java
tcp6       0      0 127.0.0.1:28105         :::*                    LISTEN      2806/java
tcp6       0      0 :::3306                 :::*                    LISTEN      2651/mysqld
tcp6       0      0 :::11211                :::*                    LISTEN      2086/memcached
tcp6       0      0 :::80                   :::*                    LISTEN      25560/httpd
tcp6       0      0 :::28180                :::*                    LISTEN      2806/java
tcp6       0      0 :::22                   :::*                    LISTEN      2088/sshd
udp        0      0 127.0.0.1:323           0.0.0.0:*                           1807/chronyd
udp        0      0 0.0.0.0:11211           0.0.0.0:*                           2086/memcached
udp6       0      0 ::1:323                 :::*                                1807/chronyd
udp6       0      0 :::11211                :::*                                2086/memcached

# ss -nutlip

The above shows its result like below:

# ss -nutlp
Netid State      Recv-Q Send-Q                                                  Local Address:Port                                                                 Peer Address:Port
udp   UNCONN     0      0                                                           127.0.0.1:323                                                                             *:*                   users:(("chronyd",pid=1807,fd=1))
udp   UNCONN     0      0                                                                   *:11211                                                                           *:*                   users:(("memcached",pid=2086,fd=28))
udp   UNCONN     0      0                                                                 ::1:323                                                                            :::*                   users:(("chronyd",pid=1807,fd=2))
udp   UNCONN     0      0                                                                  :::11211                                                                          :::*                   users:(("memcached",pid=2086,fd=29))
tcp   LISTEN     0      100                                                                 *:25                                                                              *:*                   users:(("master",pid=2755,fd=13))
tcp   LISTEN     0      128                                                         127.0.0.1:6379                                                                            *:*                   users:(("redis-server",pid=2104,fd=4))
tcp   LISTEN     0      128                                                                 *:11211                                                                           *:*                   users:(("memcached",pid=2086,fd=26))
tcp   LISTEN     0      128                                                                 *:22                                                                              *:*                   users:(("sshd",pid=2088,fd=3))
tcp   LISTEN     0      100                                                                :::25                                                                             :::*                   users:(("master",pid=2755,fd=14))
tcp   LISTEN     0      32                                                                 :::8090                                                                           :::*                   users:(("java",pid=29399,fd=43))
tcp   LISTEN     0      10                                                                 :::28090                                                                          :::*                   users:(("java",pid=4248,fd=22))
tcp   LISTEN     0      128                                                                :::443                                                                            :::*                   users:(("httpd",pid=30042,fd=6),("httpd",pid=30041,fd=6),("httpd",pid=30034,fd=6),("httpd",pid=29707,fd=6),("httpd",pid=29698,fd=6),("httpd",pid=29695,fd=6),("httpd",pid=29647,fd=6),("httpd",pid=29642,fd=6),("httpd",pid=29049,fd=6),("httpd",pid=28993,fd=6),("httpd",pid=28802,fd=6),("httpd",pid=25560,fd=6))
tcp   LISTEN     0      128                                                                :::28091                                                                          :::*                   users:(("java",pid=4766,fd=65))
tcp   LISTEN     0      1                                                    ::ffff:127.0.0.1:8000                                                                           :::*                   users:(("java",pid=29399,fd=75))
tcp   LISTEN     0      1                                                    ::ffff:127.0.0.1:28000                                                                          :::*                   users:(("java",pid=4248,fd=80))
tcp   LISTEN     0      1                                                    ::ffff:127.0.0.1:28105                                                                          :::*                   users:(("java",pid=2806,fd=336))
tcp   LISTEN     0      128                                                                :::3306                                                                           :::*                   users:(("mysqld",pid=2651,fd=15))
tcp   LISTEN     0      128                                                                :::11211                                                                          :::*                   users:(("memcached",pid=2086,fd=27))
tcp   LISTEN     0      128                                                                :::80                                                                             :::*                   users:(("httpd",pid=30042,fd=4),("httpd",pid=30041,fd=4),("httpd",pid=30034,fd=4),("httpd",pid=29707,fd=4),("httpd",pid=29698,fd=4),("httpd",pid=29695,fd=4),("httpd",pid=29647,fd=4),("httpd",pid=29642,fd=4),("httpd",pid=29049,fd=4),("httpd",pid=28993,fd=4),("httpd",pid=28802,fd=4),("httpd",pid=25560,fd=4))
tcp   LISTEN     0      100                                                                :::28180                                                                          :::*                   users:(("java",pid=2806,fd=264))
tcp   LISTEN     0      128                                                                :::22                                                                             :::*                   users:(("sshd",pid=2088,fd=4))

 

Tags CentOS7 Network Port Port netstat Facebook X
Comments 0
Similar posts
  1. Change MySQL port number for security purpose
    817
  2. chmod by type (directory and file permission)
    735
  3. CentOS warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory on CentOS 7
    1,084
  4. How to install python 3.9 alongside python 3.8 on CentOS 7?
    719
  1. Why SPF and DKIM Are Essential for Linux Email Servers?
    49
  2. Upgrading to GCC 4.9.4 in CentOS 7 requires installing a newer version manually
    586
  3. Force no caching in Apache by modifying the .htaccess file using appropriate headers
    2,688
  4. Beyond your conventional memory size with swap file instead of a partition
    1,146
  5. Gmail requires all senders to authenticate with either SPF or DKIM.
    682
  6. Bash script to install postfix and sasl for sending email
    1,200
  7. Guide for tmux shortcuts - split current pane, toggle pane
    1,311
  8. Tistory remote blogging example based in CLI & PHP
    2,746
  9. Generate Let’s Encrypt Wildcard SSL Certificate
    628
  10. Preventing Unauthorized Image Crawling by Bots: A Clever Discovery and How to Address It
    1,731
  11. Network diagnostic tool for IPv4/IPv6 - traceroute/traceroute6
    1,924
  12. Set up an SMTP server on CentOS 7
    730
  13. How to mount windows shared folder on Centos 6.8 - mount error 12 = Cannot allocate memory to the mount.cifs(8)
    921
  14. Configuring IP Address on Centos 6.7
    794
  15. Adding new cron job for automated processing on every 10 minutes on Centos 6.7
    1,336
  16. Set timezone and time on Centos 6.7
    545
  17. How to optimize MySQL automatically in CentOS Linux
    1,010
  18. File conversion to UTF in Schell Script
    1,024
  19. Server status checking by Shell Script
    1,518
  20. How can I increase MySQL max connections?
    464
Recently updated
  1. Google OAuth Token Expiration: Causes and Solutions
    29
  2. Why 100% SEO Guarantees Better User Engagement and How to Achieve It in Your Service
    55
  3. How do I create animated background for Google Meet?
    22,860
  4. MaxMind GeoLite2 vs. DB-IP Lite vs. ip-api.com: Choosing the Right Free IP Geolocation Solution
    271
  5. Meet Valkey: Why Redis Changed Its License, Why Valkey is Better, and How to Use It as a Drop-in Replacement
    103
  6. How Rogue Web Scrapers Are Stealing My Content and Destroying My Server
    168
  7. Array of arguments passed to script in PHP
    97
  8. Invalid Auction Storms in Ad Tech
    106
  9. Building MRC-Compliant Instrumentation in Ad Tech: Implementation Steps and Key Challenges
    207
  10. The Two Clocks of Ad Server Architecture
    77
  11. Frequency Cap Architecture Overview
    526
  12. Collecting Proof-of-Play from 100,000 Screens
    152
  13. Vector Search in Relational Databases (RDBs): Trends & Usage Environments
    302
  14. What is RedisVL?
    114
  15. Designing a Skill Registry Architecture: Minimize Token Usage and Maximize AI Performance
    246
  16. TPU & GPU Cluster Management Tools
    257
  17. The Concept of Scaffolding in AI Agents
    244
  18. Beyond Static Pipelines: Architecting LLM Multi-Agent Systems for Autonomous Workflow Orchestration
    596
  19. AI-DLC vs. AI-SDLC: Model-Centric vs. System-Centric AI Development
    267
  20. Fine-Tuning Open-Weight LLMs: Training, Licensing, and Deploying Custom Models with Ollama
    353
  21. Inside the Next-Generation Streaming Architecture: Ultra-Low Latency, SGAI, and AI Codecs
    206
  22. Machine Learning: Training vs. Ranking
    229
  23. The Continuous Learning Machine: Designing a Loop That Actually Turns
    228
  24. The Next-Gen Low-Latency Standards: LL-HLS & MoQ
    202
  25. Designing a Data Curation System Around a Vector Database
    230
  26. Extracting Context from Live Video: The Architecture Got Simpler When We Stopped Building Features
    263
  27. The New Ad Stack Behind Live Sports Streaming: Inside SGAI, EABN, and the Standards Race to Fix Live Monetization
    671
  28. Designing MLOps Architectures to Handle Seasonal Data Drift in EV Fleet Models
    200
  29. From 15 to 40+ FPS: Accelerating PyTorch Object Detection on Automotive ECUs
    232
  30. Understanding Data Lineage
    271