Which netstat state indicates the socket is listening for incoming connections?

Study for the OSCP Linux Exam. Use our flashcards and multiple-choice questions to test your skills. Each query comes with detailed hints and explanations to enhance your preparedness. Get ready to conquer the exam!

Multiple Choice

Which netstat state indicates the socket is listening for incoming connections?

Explanation:
In TCP, a server socket that has been bound to a local address and port and is waiting for new connections sits in the LISTEN state. netstat reports LISTEN for those sockets, indicating they are ready to accept incoming connections. An ESTABLISHED state means there is an active TCP connection between two endpoints. CLOSED means the socket is not open or a connection has been closed. SYN_SENT means a connection attempt has been initiated and a SYN has been sent, but the handshake hasn’t completed yet. So, when you want to know which socket is waiting for incoming connections, the LISTEN state is the right indicator.

In TCP, a server socket that has been bound to a local address and port and is waiting for new connections sits in the LISTEN state. netstat reports LISTEN for those sockets, indicating they are ready to accept incoming connections. An ESTABLISHED state means there is an active TCP connection between two endpoints. CLOSED means the socket is not open or a connection has been closed. SYN_SENT means a connection attempt has been initiated and a SYN has been sent, but the handshake hasn’t completed yet. So, when you want to know which socket is waiting for incoming connections, the LISTEN state is the right indicator.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy