-
August 24th, 2005, 07:54 AM
#1
Member
When is a port considered to be closed?
Hi
I have a question, and I strongly believe people here can explain this.
When is a port considered to be closed?
a) If OS is specifically configured to block it.
b) When no service is running on the port.
Pl. put your thoughts.
Anban
-
August 24th, 2005, 07:58 AM
#2
-
August 24th, 2005, 01:03 PM
#3
Not always true, TheSpecialist. What about inetd? Telnet, for example, doesn't run on port 23 until someone attempts to connect to your system on port 23. Then (assuming inetd is running) inetd checks the /etc/services file to see which port you have telnet configured on, and starts the service on that port. There isn't anything running on port 23 until someone attempts a connection on that port, right?
Perhaps I'm just splitting hairs.
Anyway, anban, to declare a port completely closed, I would turn off inetd, comment out any services you're not using in the /etc/services file on that port, and call it a day.
/* You are not expected to understand this. */
-
August 24th, 2005, 01:27 PM
#4
I think the word 'closed' is a bit poorly chosen. It's not a door that you can open and close all the time. A port just has different states. Either it is disconnected, it is listening or it is connected. That should be better definitions to use with ports, in my opinion...
If an OS is blocking a port, it is blocked, basically. The OS basically connects to it so no other form of communication can be done with it it.
And what kind of state is listening? Simple. For all communications you will need two sides to take part in it. One side that 'opens' the port and then starts to listen for incoming messages and the other side that 'links' to this open port to start the communications. As long as one side is connected to a port, it can't do much with it except listening until something makes a connection with it. You could call this 'open' because when a connection is made, the port will be closed for other processes for the duration of this communication...
Don't get too confused about definitions of words. There tend to be plenty of different definitions for these kinds of things. Just understand the logic behind it, which is more important when you need to use it.
-
August 24th, 2005, 02:15 PM
#5
port is considered closed when client sends a SYN and receives a FIN or a RST in response.
port is considered blocked when client sends a SYN and receives no response.
Meu sítio
FORMAT C: Yes ...Yes??? ...Nooooo!!! ^C ^C ^C ^C ^C
If I die before I sleep, I pray the Lord my soul to encrypt. If I die before I wake, I pray the Lord my soul to brake.
-
August 24th, 2005, 03:05 PM
#6
-
August 24th, 2005, 04:26 PM
#7
Generally closed ports will send an rst/ack in response to unwanted tcp traffic, not a fin. And icmp port unreachable is sent for udp.
Blocked will generally drop the traffic or have an icmp response from the local router...something along the lines of admin prohibited..
"When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
"There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
"Mischief my ass, you are an unethical moron." - chsh
Blog of X
-
August 24th, 2005, 06:01 PM
#8
Member
I'm surprised, no one went into too much detail about filtered ports.
-
August 24th, 2005, 06:06 PM
#9
No one really asked about port filtering afaik.
"When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
"There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
"Mischief my ass, you are an unethical moron." - chsh
Blog of X
-
August 24th, 2005, 06:13 PM
#10
I allways thought of filtered as what cacosapo calles blocked (when client sends a SYN and receives no response)
ASCII stupid question, get a stupid ANSI.
When in Russia, pet a PETSCII.
Get your ass over to SLAYRadio the best station for C64 Remixes !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|