Ports aur Protocols Kya Hote Hain? Networking & Bug Hunting Guide (Day 13)

🌐 Day 13: Ports & Protocols

Agar aap Bug Hunting ya Cyber Security seekh rahe ho, to Ports aur Protocols samajhna bahut zaruri hai.

Kyuki:

👉 Data sirf IP se nahi, port ke through bhi travel karta hai.
👉 Communication sirf tab possible hai jab dono side same protocol follow karein.

Chaliye simple language me samjhte hain.


🚪 Port Kya Hota Hai?

Port ek communication endpoint hota hai.

IP address batata hai:

👉 Kaunsa device

Port batata hai:

👉 Kaunsi service

Example:

Agar IP ek ghar hai,
to port us ghar ka specific room hai.


🔢 Port Number Range

Ports 0 se 65535 tak hote hain.

Inhe 3 categories me divide kiya jata hai:

1️⃣ Well-Known Ports (0–1023)

Common services ke liye reserved.

Example:

  • 80 → HTTP

  • 443 → HTTPS

  • 21 → FTP

  • 22 → SSH


2️⃣ Registered Ports (1024–49151)

Applications use karti hain.


3️⃣ Dynamic / Private Ports (49152–65535)

Temporary connections ke liye use hote hain.


📡 Protocol Kya Hota Hai?

Protocol ek set of rules hota hai jo decide karta hai:

✔ Data ka format kya hoga
✔ Data kaise send hoga
✔ Error handling kaise hogi

Simple words me:

👉 Protocol = Communication ka rulebook


🌍 Important Networking Protocols

1️⃣ HTTP (Port 80)

Web pages transfer karta hai.
Secure nahi hota.


2️⃣ HTTPS (Port 443)

Encrypted web communication.
Secure version of HTTP.


3️⃣ FTP (Port 21)

File transfer ke liye use hota hai.


4️⃣ SSH (Port 22)

Secure remote login ke liye use hota hai.


5️⃣ SMTP (Port 25)

Email send karne ke liye.


6️⃣ DNS (Port 53)

Domain name ko IP me convert karta hai.


🔁 IP + Port Example

Agar likha ho:

192.168.1.10:443

Iska matlab:

  • Device IP = 192.168.1.10

  • Service = HTTPS


🔐 Bug Hunting Me Ports Kyun Important Hain?

Bug Hunters check karte hain:

✔ Kaunse ports open hain
✔ Kya unnecessary service running hai
✔ Kya default port exposed hai
✔ Kya outdated protocol use ho raha hai

Example vulnerabilities:

  • Open database port

  • Weak FTP configuration

  • SSH brute-force risk

  • Misconfigured mail server


🛡 Protocol Security Example

HTTP → Data plain text me
HTTPS → Data encrypted

FTP → Insecure
SFTP/FTPS → Secure

Protocol choice security ko directly affect karta hai.


📊 Quick Comparison

TermMeaning
IP AddressDevice identify karta hai
PortService identify karta hai
ProtocolCommunication rules define karta hai

📝 Exam Definition

Port ek numerical communication endpoint hota hai jo specific service identify karta hai, aur Protocol rules ka set hota hai jo network communication ko manage karta hai.


🚀 Conclusion

Aaj aapne samjha:

✔ Ports kya hote hain
✔ Protocol kya hota hai
✔ Important port numbers
✔ Security relevance

Ab aap networking ka practical structure samajhne lage ho 🔥

Next Day: 


⬅ Previous Day                       

                               Next Day ➡