Attached is a java utility that launches a server socket on a specified local IP and port. This requires Java to be installed, which is required anyway for the PAM access methods to work. If you use a browser to logon to PAM, you must have a JRE installed and enabled the Java plugin in the browser. If you use the PAM client, it comes with a JRE that you can use to launch the java utility. Use it as follows:
- Extract the TestServerSocket.class from the server_socket.zip file
- Open a Cmd window and go to the folder that contains the class file
- Launch the utility with this command (change the path to the java executable as needed, and make sure to choose a port that is not in use):
>"C:\Program Files (x86)\Java\jre1.8.0_201\bin\java" -cp . TestServerSocket 127.0.0.200 55555
You should see the following output:
Listening on IP 127.0.0.200 and port 55555
- Launch a telnet client and connect to 127.0.0.200 on port 55555, or whatever port you chose. If you have a PuTTY client installed, you can launch PuTTY, select connection type telnet, and enter IP and port, then connect.
If the connection is allowed, you will see text "Enter any text to stop me >>" on the client, and the utility will show message "Client connected, sending message and waiting for response ...". Once the response is received the utility will exit and the client will report that the connection is lost. This is fine.
If the connection is not allowed, the client will not be able to connect and most likely report a timeout error after a while. You will have to change whatever policy blocks the connection and get the test case to work. Once the local connections work, the PAM client should work as well.
In case if you are getting error "Unsported major.minor version 52.0" error, it is because you are running on different version of Java (such as JRE 1.7.0_xx)
Please refer to https://en.wikipedia.org/wiki/Java_class_file
Java SE 8 = 52, meaning you need to use JRE 1.8.0_xxx