client/server security protection

I want my server application to only accept incoming connections from certain ips. I know there is a SecurityManager class where I can write my own class to extend this, but the function acceptConnect takes ip and port. What if I don't care what port the client is on? I mean obviously if a client connects to the server they will be connected on a local port.

Anyhow, is there another level of protection I can have between my client/server application like a password of some sort? Do I need a security manager for something like this?

[552 byte] By [smiles78] at [2007-9-30 20:05:57]
# 1
You have to be listening for connections on some particular port, you can't just accept connections any old where (AFAIK). So, the IP/port number combo should work for you.
nasch_ at 2007-7-7 0:52:03 > top of Java-index,Java Essentials,Java Programming...