Jump to content
2 minutes ago, ilyas001 said:

hi guys right now i learned that we use some exact numbers for ports like 23 for telnet but what's a port because when i search i only get physical ports explanation i don't understand is it a physical port n each server or some protocol ? 

 watch and learn

Its a Championship not a Belt!

Link to comment
https://linustechtips.com/topic/647504-what-are-ports/#findComment-8330719
Share on other sites

Link to post
Share on other sites

38 minutes ago, ilyas001 said:

i don't need the list i have it i want to understand what's the difference between a normal port an another one with a number on it 

A physical port is something you can plug something else into. Audio jacks, power plugs, etc. are examples.

A TCP or UDP port is what a connection passes through when you're accessing resources or services on a server.

Servers have 65335 available ports for various services running on them.

SSH (22), HTTP/S (80/443), TELNET (23), etc. all need a port to be accessed.

Desktop: KiRaShi-Intel-2022 (i5-12600K, 5060 Ti) Mobile: Moto Razr 50 Ultra (Razr+ 2024) | 30GB CAN+US+MEX $30/month
Laptop: Lenovo Yoga 7i (16") 82UF0015US (i7-12700H, 16GB/2TB RAM/SSD, A370M GPU) Tablet: Lenovo Tab Plus (256GB)
Camera: Canon M6 Mark II | Canon Rebel T1i (500D) | Canon SX280 Music: Spotify Premium (CIRCA '08)

Link to comment
https://linustechtips.com/topic/647504-what-are-ports/#findComment-8330892
Share on other sites

Link to post
Share on other sites

5 minutes ago, kirashi said:

A physical port is something you can plug something else into. Audio jacks, power plugs, etc. are examples.

A TCP or UDP port is what a connection passes through when you're accessing resources or services on a server.

Servers have 65335 available ports for various services running on them.

SSH (22), HTTP/S (80/443), TELNET (23), etc. all need a port to be accessed.

ohhh ok thanks so a tcp port is more like a mac adresse it's something not physical that helps thanks 

Link to comment
https://linustechtips.com/topic/647504-what-are-ports/#findComment-8330921
Share on other sites

Link to post
Share on other sites

Actually a MAC address is a representation of your physical port.

It represents the 2nd layer of the OSI model.

 

In the third layer which is the network layer there's the IP address.

 

The fourth layer or transport layer deals with ports.

 

The reason there are ports is for the two communicating devices to know what an IP packet is for. For example connecting to a webserver via port 80 (that's HTTP) usually gives you access to a web page, but connecting via port 22 could be a shell access for administrator (port 22 is SSH). Now, if there would be no ports, the webserver could not differentiate between one packet or another and therefore could not know when someone just wants to view the webpage and when someone needs an access to the admin side of things.

This is a very rough simplification but perhaps you get the point.

 

Also, ports are not always predetermined. You have your common ports list, sure, but pretty much everything is configurable. You can run a webserver in other ports than 80 or 8080, or 443 for https. In fact that's not uncommon when you have multiple services on one server. For instance, your webserver is running 7 different webpages, all with the same IP. The webpages need to have different ports configured for it to be possible to someone to reach them all via internet. What happens in the meantime between someone typing a URL to a web browser and the server responding is a different story altogether.

 

https://en.wikipedia.org/wiki/OSI_model

Edited by U.Ho
Added a link to OSI-model wiki.
Link to comment
https://linustechtips.com/topic/647504-what-are-ports/#findComment-8332089
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×