For work we use Cisco AnyConnect VPN 2.4.0202 as a way to VPN into our work network. When I am using JDK7 with various tools (such as SOAP UI, SQLuirrel, Netbeans) they all fail to connect to the Internet with "Permission Denied" exceptions when trying to open sockets.

Thu Apr 29 12:21:41 PDT 2010:ERROR:java.net.SocketException: Permission denied: connect
java.net.SocketException: Permission denied: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:69)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:316)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:177)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:164)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:154)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:390)
at java.net.Socket.connect(Socket.java:578)
at java.net.Socket.connect(Socket.java:527)
at java.net.Socket.(Socket.java:424)
at java.net.Socket.(Socket.java:279)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at com.eviware.soapui.impl.wsdl.support.http.SoapUIMultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(SoapUIMultiThreadedHttpConnectionManager.java:1666)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:170)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:122)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:717)

JDK 7 brings support for IPv6 on Windows. When you attempt to connect to an IPv4 address then under the covers it will use an IPv4-mapped IPv6 address. From the discussion here, it would appear that the Cisco AnyConnect VPN product doesn't support IPv6 sockets. The original post said version 2.4.020, does anyone know if that is the latest and whether it can be configured to support IPv6?

I get the same issue using JDK1.7 with JavaMail 1.4.4. Connect permission is denied on SMTP port 25.
The code works fine under JDK1.6 and is also fixed under JDK1.7 by using the -Djava.net.preferIPv4Stack=true runtime flag.

I am also facing the same issue. Could one of you please let me know where to specify the "Djava.net.preferIPv4Stack=true" parameter? Please note that we are getting this error when trying to access Java pages. We don't use Eclipse. I tried adding this value under "C:\WINDOWS\sun\java\deployment\deployment.properties", but that didn't help.