My ubuntu server can't connect to binance websockets (errno: -111 | code: 1006)

Im getting this message when i try websockets connection with nodejs:

  'WebSocket error: heStzDmfg5HKgWKGUHwrGss2EXhnB29vXeNsIay55NNAG7FUx7RuelXQXaKW (ECONNREFUSED) connect ECONNREFUSED'
  Error: connect ECONNREFUSED
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '',
    port: 9443
  'WebSocket closed: heStzDmfg5HKgWKGUHwrGss2EXhnB29vXeNsIay55NNAG7FUx7RuelXQXaKW (1006)'

BTW on my local machine it does work just fine. It doesnt work when i run the code on the server because of this error.

How do i make it work?

Checking the server networking.

What do i need to check?