Essential Port Numbers for DevOps Engineers

Listen to this Post

As a DevOps engineer, understanding key port numbers is critical for networking, security, and troubleshooting. This article provides a detailed breakdown of commonly used ports along with debugging commands to streamline your operations.

You Should Know:

1. Web & HTTP(S) 🌐

  • Port 80: HTTP (Hypertext Transfer Protocol)
  • Port 443: HTTPS (HTTP Secure)

Commands:

  • Check if a port is open:
    nc -zv <IP_ADDRESS> 80
    
  • Test HTTPS connectivity:
    curl -I https://<DOMAIN_NAME>
    

2. SSH & Remote Access 🔑

  • Port 22: SSH (Secure Shell)

Commands:

  • Connect to a remote server:
    ssh user@<IP_ADDRESS>
    
  • Generate SSH keys:
    ssh-keygen -t rsa -b 4096
    

3. Database Ports 🛢️

  • Port 3306: MySQL
  • Port 5432: PostgreSQL
  • Port 27017: MongoDB

Commands:

  • Check MySQL connection:
    mysql -h <IP_ADDRESS> -u <USERNAME> -p
    
  • Test PostgreSQL connection:
    psql -h <IP_ADDRESS> -U <USERNAME> -d <DATABASE_NAME>
    

4. Kubernetes & Containers 🐳

  • Port 6443: Kubernetes API Server
  • Port 2379: etcd (Kubernetes key-value store)
  • Port 10250: Kubelet API

Commands:

  • Check Kubernetes cluster status:
    kubectl get nodes
    
  • List running pods:
    kubectl get pods -A
    

5. Monitoring & Logging 📊

  • Port 9090: Prometheus
  • Port 3000: Grafana
  • Port 9200: Elasticsearch

Commands:

  • Check Prometheus targets:
    curl http://<PROMETHEUS_IP>:9090/api/v1/targets
    
  • Query Elasticsearch:
    curl -X GET "http://<ELASTICSEARCH_IP>:9200/_cat/indices?v"
    

What Undercode Say:

Mastering port numbers and their associated commands is essential for DevOps engineers. Whether you’re troubleshooting network issues, securing your infrastructure, or managing containers, these tools and commands will help you stay efficient and effective. Always ensure ports are properly configured and secured to prevent unauthorized access.

Expected Output:

  • Port 80: HTTP traffic verified.
  • Port 22: SSH connection established.
  • Port 3306: MySQL database accessible.
  • Port 6443: Kubernetes API server responsive.
  • Port 9090: Prometheus targets healthy.

By integrating these commands and practices into your workflow, you can ensure smooth and secure operations in your DevOps environment.

References:

Reported By: Ashwini Jawadwar – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image