WebSocket requests to public URL's blocked by Pritunl

I am using Pritunl version pritunl v1.32.3732.84 on a standalone EC2. Our setup is that all internal URL’s(Private IP’s) will go through Pritunl.

I created a WebSocket API to stream audio files to AWS through API GW. When I am connected to the VPN, the requests somehow gets blocked? I do not see any info on the logs as well.

With VPN:
wscat -c wss://rdtn0ckz01.execute-api.ap-south-1.amazonaws.com/prod/
error: Unexpected server response: 40

Without VPN:
wscat -c wss://rdtn0ckz01.execute-api.ap-south-1.amazonaws.com/prod
Connected (press CTRL+C to quit)

Any suggestions are welcome to resolve this.

This is likely due to incorrect routing. Verify the IP address on that domain is routed through the VPN server.

I am hitting a Public IP and the config only allows private IP’s with the VPN. I am adding the screenshots here if its any help.

Here is the Config of the server

Attempting to connect to the public IP address of that server is never going to return a remote IP of the VPN private network. The public IP of the server is not included in the routes and all of the routes are NAT. Even if it were done correctly I don’t think AWS supports that kind of routing which would involve a hairpin NAT to get back to the virtual VPN IP. Connect to the private IP of the server.

I understand. I do not want to route such traffic through Pritunl. My question is why would pritunl Block it? Anyways the traffic will not go through Pritunl but for some reason it does and somehow it is getting blocked. Our Developers cannot work on this as some API’s are internally hosted on the private IP and this URL would need to be publically routed for the implementation to test and implement.

If you’re not trying to route traffic to that WebSocket server through the VPN and the server is blocking it when connected it’s likely a DNS issue. That appears to be an AWS host, if you run a VPN client on that it will overwrite the DNS settings. AWS applies custom DNS server to instances and that change is likely causing the problem. Either clear the DNS servers from the server settings in Pritunl or disable DNS from the VPN client.