Question about ports

Sep 23, 2012 at 6:41pm
Hello fellow programmers,

I'm working on an application to intercept any connection made through the internet.
Currently, I'm experimenting with firefox and curl.
It seems that those applications are communicating on the ports 46968 and 2115.
I'm not intercepting all connections from firefox, and I can't be sure I'm intercepting all connection all connections from curl, but at least I notice connections being made on those ports.

I find this curious because I was expecting to see activity on ports 80, 43, and maybe 443. (HTTP, DNS and HTTPS respectively).
I there something oversee? Something I don't know about?

Can someone tell me why I come accross ports 46968 and 2115?
Thanks a lot.
Sep 23, 2012 at 6:57pm
To make it more interesting, I've noticed that they use different ports every now and then, but they all seem to be pretty close to the ports I just mentioned.
Sep 23, 2012 at 7:08pm
Servers use well known ports as they are called - For example web servers hang around on port 80 waiting for clients to make a connection to them on that port.

The local port used by the client program is usually any port as they are not expecting incoming connections.
Sep 23, 2012 at 7:19pm
Right, I was already suspecting those ports might be local ports, but I don't see how this could be.

I don't know if you are familiar with libc calls on linux, but I'm intercepting all the connect() calls that are being made.

You have to pass an address structure to this function, but shouldn't the port in this structure be the port the server is listening on?
Topic archived. No new replies allowed.