I work in a restrictive desktop/network environment and I am not an admin on my laptop. The ports available to me are limited. E.g. when I tried running Tomcat, the system refused to open a socket on the port for which Tomcat was asking.
However, some port ranges are obviously open as I can, for example, use the internet, network, and connect to Unix boxes using SSH. When I was on the Unix box, I used
netstat to find out from which ports my IP made multiple connections. Then I tried to write a Java program to open a port in that ballpark (51K range) and it succeeded. On another random port (e.g. in the 4000 range) I could not mount a socket.
So my question is this: how can I get a listing of the security policy on my laptop, even if it is read-only, so I can see which ports are available to me and which are not?