0

i have a quick question about tcp port states: suppose i am establishing a tcp connection to a server: source address/port should be 44.44.44.44:33456 destination address/port is 55:55:55.55:443. in what state is port 33456 in while waiting for the answer from the server? would nmap recognize the port as listening?

and how would it behave with udp?

1

in what state is port 33456 in while waiting for the answer from the server?

https://en.wikipedia.org/wiki/Handshaking#TCP_three-way_handshake

It's not in a listening state no matter if a connection has been established or not.

would nmap recognize the port as listening?

No, never.

and how would it behave with udp?

For UDP you need specify the remote IP address to talk to, so it's unlikely that the port will appear open for a different probing host:

int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen)

It might appear in a listening state for the remote server.

Please ask at https://networkengineering.stackexchange.com

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.