How can I establish a ServerSocket that doesn't accept connections from certain IPs, especially before accept() returns a Socket instance?

Tim Rohaly

This is probably better done externally to your application, using packet filtering software or hardware.

You also have the option of providing your own socket implementation factory and installing it by invoking ServerSocket.setSocketFactory(). You could then code your factory to provide sockets which accept/deny based on source IP.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact