Community discussions

MikroTik App
 
ahmedsalah
just joined
Topic Author
Posts: 3
Joined: Fri Apr 14, 2017 10:27 pm

Websockts through RouterOS Issue .

Wed May 10, 2017 1:14 pm

We have an application that uses websocket technology in (NodeJS) and when we tested it without RouterOS it works perfectly , but when we tested it through RouterOS it doesn't work
the websocket server is running ok , but the websocket client (browser) it fails to connect to the server through RouterOS ,

i don't understand , the websocket is just upgrading HTTP connection to TCP connection in the same port , i use the same port for websocket and http server !

can you please help us to understand this issue and maybe helping us solving it ! .
 
Sob
Forum Guru
Forum Guru
Posts: 9188
Joined: Mon Apr 20, 2009 9:11 pm

Re: Websockts through RouterOS Issue .

Wed May 10, 2017 3:56 pm

By default, RouterOS is just passing packets from one interface to another. It doesn't care what's inside them, it doesn't filter them, it doesn't modify them. But RouterOS does give you enough options to break stuff, so it depends on what you configured. But you didn't tell us anything about that.
 
ahmedsalah
just joined
Topic Author
Posts: 3
Joined: Fri Apr 14, 2017 10:27 pm

Re: Websockts through RouterOS Issue .

Wed May 10, 2017 4:23 pm

Hi Sob ,

i think RouterOS modify HTTP packet and it thinks -while ws upgrading and resend the handshake - that the connection is HTTP !! i don't understand , maybe because the response when doing the handshake should be 101 but it returns in a 200 error while connecting to the ws server , but it serve HTTP without any problems ? is it the port or should i write some rules to bypass this ! , thank you so much for helping us !!
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Websockts through RouterOS Issue .

Wed May 10, 2017 4:40 pm

You should first show us what rules you already have.
I bet there are those broken "block youtube" and "block peer-to-peer" L7 filters that so many users here have posted.
 
Sob
Forum Guru
Forum Guru
Posts: 9188
Joined: Mon Apr 20, 2009 9:11 pm

Re: Websockts through RouterOS Issue .

Wed May 10, 2017 7:46 pm

Another idea, you didn't even tell us what exactly you do with RouterOS. I first understood it as normal router before server, either just routing public addresses or doing some port forwarding. But you can also use RouterOS as HTTP proxy, which would be completely different scenario.

Who is online

Users browsing this forum: No registered users and 4 guests