You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Des Magner <de...@gmail.com> on 2014/12/05 12:21:31 UTC

How to configure security for remote access to WebSocket

Hi

I cannot access any websocket applications when my client runs on a 
different machine from tomcat. It works fine if everything is on the 
same machine but once I access from a different machine I see the error 
below in my Firebug console:

"NetworkError: 403 Forbidden - 
http://remote-host:8080/examples/websocket/chat"


I have tested with all the sample websocket apps that come with tomcat 
and both with versions 7 and 8 of tomcat. I guess I need to configure 
some security constraint somewhere to allow access but I cannot find any 
documentation on it.

Thanks
Des


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to configure security for remote access to WebSocket

Posted by Des Magner <de...@gmail.com>.
Yes that was it Daniel. My browser was configured with a proxy and that 
was what was causing the problem.

Sincere Thanks
Des

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to configure security for remote access to WebSocket

Posted by Daniel Mikusa <dm...@pivotal.io>.
On Fri, Dec 5, 2014 at 9:29 AM, Des Magner <de...@gmail.com> wrote:

> I checked the logs and the the request does not seem to be making it to
> tomcat. There is no reference to it in the access log file.


That would almost certainly indicate that something is blocking it.  If the
request hit Tomcat and Tomcat were the one telling you that access was
denied, you would have a line in the access log.


> It is my own server so blocking should not be an issue. I checked the
> firewall logs and I don't see anything,


Look at your browser or OS and see if it's configured to use a proxy.  If
it is, perhaps look at excluding the IP address of your server so that
requests to it do not go through the proxy.


> But do I need to open other ports to allow access? My understanding is
> that with Websocket everything gets tunnelled through port 8080?
>

You shouldn't need to open any additional ports, everything will go on your
HTTP port.

Dan



>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: How to configure security for remote access to WebSocket

Posted by Des Magner <de...@gmail.com>.
I checked the logs and the the request does not seem to be making it to 
tomcat. There is no reference to it in the access log file. It is my own 
server so blocking should not be an issue. I checked the firewall logs 
and I don't see anything, But do I need to open other ports to allow 
access? My understanding is that with Websocket everything gets 
tunnelled through port 8080?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to configure security for remote access to WebSocket

Posted by Daniel Mikusa <dm...@pivotal.io>.
On Fri, Dec 5, 2014 at 6:21 AM, Des Magner <de...@gmail.com> wrote:

> Hi
>
> I cannot access any websocket applications when my client runs on a
> different machine from tomcat. It works fine if everything is on the same
> machine but once I access from a different machine I see the error below in
> my Firebug console:
>
> "NetworkError: 403 Forbidden - http://remote-host:8080/
> examples/websocket/chat"
>
>
> I have tested with all the sample websocket apps that come with tomcat and
> both with versions 7 and 8 of tomcat. I guess I need to configure some
> security constraint somewhere to allow access but I cannot find any
> documentation on it.
>

Maybe look at the access log and verify that your request is making it to
the Tomcat server.  If you're on a corporate network, your request might be
being blocked by a proxy or some other network device.

Dan


>
> Thanks
> Des
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>