Port Number in Cybersecurity | Open Ports | Closed Ports | Filtered Ports

hello everyone i welcome you all to my


and you are in the series of fundamental

of cyber security and in the previous

session we had seen

port and the importance of code okay in

this session we will understand

you know specifically we'll understand

port a relation with

a security okay or a cyber security so

i'm gonna take a new whiteboard here

and uh you know in the previous session

as i told you that

there is a port and so when i say port

i can say it's a way

it's a way to help system

it's a way to help system uh to identify

establish so sorry for this

and transmit data from one end to


transmit data from one end to another

now you know there are many ports which

you already know such as if i say that

is http

and then http has a port number 80

then if you go for https a secure

version of http then there is a 443

if you go for ftp then there is a port


21 if you are having smtp which is for

male purpose male extension then

you are having 25 and so on okay there

are many actually port number dns having

53 and all

so you can you know go for there is a

list of

all port numbers in the internet you can

search for that uh

so it's a simple thing you can do it

okay so this is

you know the port numbers and the the

important port numbers you need to

remember it okay

one another note here is what this is

uh maybe i can uh okay no problem let me

take a note here

note says

once a port

is running application is


sorry it is running on one number

you cannot use

sorry this is actually can't you can't


the same number same port number


same port number

for other service to run for other


to run now you will ask the question sir

why there is a http 80 which is meant

for browsing purpose right

443 meant for browsing purpose but

whenever i type

here whenever i do you know search

google.com or any ip if i provide

i never put port numbers how this

browsing you know understand that there


there is i want to go for http or https

well it is

you know implicitly if you see the url


it is the port number is there in the

url itself

but it is abstracted from the user okay

implicitly there

it is there in the url itself so you do

not have to write the google i p address


and we do not have to write the google i


address and then port numbers this is


very necessary so even if you do like

this if i go for here and if i

search the uh the google ip here i'm so

sorry i think i need to go for

i think dash 4 to give me the ipad so

this is the ipad is 172.

172.217. so let me write here

172. i'm so sorry 217

7.166 that

174 very bad number so i i do not have

to write here port numbers okay when i

hit enter

automatically automatically google.com

will gonna open okay

so if even if i write here 443 which is

a hard coded explicit port number i'm

putting over here

even if i write here it will open the

you know google.com problem

oh yeah so it is not working because i


i'm doing it in a very wrong manner i

should not provide here

but if i have a local application so

that local application will not work in

that manner

okay you have to provide the port number

and then and then then and then only it

will work

so implicitly the port number is there

in the url itself

but we never write it okay we never

write it so you see

i had written here but it is not it is

not working 172 dot

i think it's a 217

and if i put here 80 so yeah it is okay

now it is okay sometimes it is working

and sometimes so if i'm putting

443 it is not working why it is not

working i do not know it should be an

http is there but

you see it is not working but if i go

for http it's working

uh so you see it's a hard coded i'm

putting it

it's a it's explicitly i'm putting over

here but

browser always do this implicitly okay

so it will open the google.com so

this is the thing that the port is

giving you

uh so this is all about port now why it

is important okay why it is important

this cyber security why do we need to

understand it

so let's understand this thing so

you see here let me take a new thing

so see i already told you about

something called as vulnerability

so in a simple thing vulnerability is a

computer having a loophole or a weakness

all right so there is a weakness there

is this hole is basically a weakness

so if i say this okay now this port

number as i told you

now what port number is exec exactly is

it's a service okay it opens a service

in a computer

so a port number port number

here opens a service

in a computer

so whenever packet comes up

to a computer this computer is going to


a hole here inside this this packet goes

and you know the all service that this

packet is intending for

is going to be run on this computer all

right so it is opening it is

opening a port here inside this computer

all right

so this port is very important for an

attacker perspective

if he can find a port number which is

open okay a port number which is

open inside this computer so if a port

number is open to this computer then an

attacker comes here and will use this

loophole or this you know open port to

enter into the system

he will he will use this open port okay

he will use this open port to enter into

the system

and you know enter into the system and

can gain access

so this is the open port and we cannot

close some port

right we cannot do that like suppose if

i have a 80

for http it is going to be open every

time i cannot

close it right this is not possible

somehow because if you

close it then i do not have internet


internet is going to be closed here i

cannot browse anything

so in the same way if i have a 21 ftp

all right if i close this then somehow i

cannot do the file sharing this is

somehow not possible in this computer

so there are some default port that i

need to be

open okay apart from default open ports

there are certain other application uh

to which i need to open the ports

right and these open ports are very

important for an attacker

if he finds this open port they're gonna

enumerate that open port and will enter

into the system okay he will do the port

escalation there

this is very important if your computer

is having some open port

then you have to see you have to look

after that you have to see that these

open ports are

you know opening the gates for the

attacks from the attackers you have to

see that all right

so in general your computer having three

types of things

one is something called as open port you


the meaning of open port right this is

open port there is another thing is

closed port

and then third port is known as filtered


three things are there filtered so three

things are there

open port closed port and filtered port

you understand these three things

what happens in open port so let's say

this is an open port

you send something here okay you send

something some packet here

some request is there this open port

will give you a response back

okay this this open port is going to

response back

so this is an open port this happening

that's why that's why attackers are very

you know

very keen to know is there a open port

in the target computer or not

now let's say uh now let's say let me

take a

another color here i need to take a

white is not coming okay okay so let's

say now

now let's say closed port now what will

happen in closed port

so this is a closed port okay i'm gonna

close it

so when you send a request to this port

okay when you send a

when you send a request or a packet to

this note

this close port will you know not give

you anything it is not listening

at all it will not give you anything

it's a

it will not reply you back so it's a

closed port

okay there is a port number closed for

you so let's say ah

four four four if you are sending

ip address here and this port number

then it will say

that uh you know if the response is not

coming from the port number then

you can say that this is a closed port


so mainly the port that are no longer

have any service okay

there is no service running on such port

numbers are known as closed port

now apart from that in contrast to that

we are having a filtered port let's say

now what happens to a filtered port so

if let's say this is a filtered

that means half open half close so this


a filtered port and i'll tell you why it

is half open and half closed

filtered port so what happens in

filtered port basically

you send something to these port numbers


so there is a request packet here but

you see you will get a reply

you will definitely get a reply here

maybe uh

but it is not for open it will not say

that i am open

it says i'm a filtered port okay it is

it will take it will it will tell you


basically this this is not reply don't

worry don't think about that this is a

this is not a reply it will only say

that i am a filtered vote okay

what do you mean by filtered port it is

something like if this computer has

a protectiveness all right something

like firewall

if i have a firewall installed on this

computer then

a request comes to you know a packet

comes to a request comes

to this computer will directly going to

be dropped

okay it is going to be dropped this


is going to be dropped by the firewall

and you will not get the

reply back so that's why it is a

filtered port

so it is going to be you know it is

filtered by those

protectiveness protective measures is

going to be filtered by your firewalls


you know this ids and they're going to

drop such packets so

support scanning is not allowed there on

such uh computer where a

firewall is being installed so this is

a open port closed port and filtered

port now sir attacker how attacker gonna


that there is an open port the the


mechanism to

find open port

or closed port maybe

close would be a reliable word closed

port is known as

something called as port scanning

you see the meaning of code scanning is

you are scanning the ports okay you are

you are

you are using an application here so

this is an application such as

nmap we are using an application

and this application gonna scan a


okay scan a computer and it will find is

there any open port

closed port or filtered port

so this is the thing that this is the

thing that

port scanner tools uh is used okay

they're gonna scan the whole computer

for open ports

and then they're gonna tell you that

these are the ports which are open in

the computer

so now you can escalate this port and

you can enter into the

system of the target machine all right

so this is all about

you know the perspective of cyber

security with the port numbers

i hope you like it if you like it please

uh hit that like button

and if you are new to my channel please

subscribe to my channel thank you so

much for listening me if you have any

doubt you can chat you can come

to comment in the comment section uh

i'll be happy to help you thank you so