WebSocket connection on localhost and certificates

My domain is: bcs.visualware.com

I read this article and it gives me hope that someone here will know how to resolve this.

Our use case is:

Our browser-based solution uses web sockets to communicate with a utility running on the client's computer. We control both ends of the communication. We use the domain above, which resolves to 127.0.0.1 to open a secure web socket to our utility.

In almost all scenarios this works.

However, more frequently we are seeing issues with DNS rebinding protection that blocked DNS lookups that resolve to local IPs.

Our current certificate authority won't issue a certificate for localhost, only a specific IP private IP address. This doesn't help us as we need to know the IP in advance to initiate the connection and every client will be different.

We also can't connect using wss://127.0.0.1 due to lack of certificate and we can't use ws://127.0.0.1 because most sites are hosted over HTTPS.

My question is, how do we set this up in a way that remains secure but does not trigger DNS rebinding protection?

There IS a workaround, that involves updating DNS servers on the client to something like 8.8.8.8. However, this increases friction at the client end and could easily disappear as a solution at any point.

Guidance welcome.

Hi @fourways1984
Welcome to the community.
Based on what I think I understand from your post you are trying to an internal service for an "app" "utility" "thing" on localhost.
If I am not correct please inform me.

If you have control of your internal DNS (or dual homed or "split" DNS) you might consider giving the "localhost" or your "utility" an internal alias that matches your domain name.
Your certificate from Globalsign is a wilcard cert. Use it.

Subject: CN = *.visualware.com

So if you apply that cert to your mystery box "localhost" "utility" you may resolve your issue.

This is not a Globalsign forum, by the way.

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.