Bitwarden App unable to connect to public hosted installation via Hostname, but IP is working #261

Closed
opened 2025-11-07 06:30:33 -06:00 by GiteaMirror · 17 comments
Owner

Originally created by @davidh2k on GitHub (Mar 24, 2019).

I just installed bitwarden_rs via the Docker image from mprasil/bitwarden:latest and had some trouble connecting to it. I figured out that since its http based Google Chrome doesn't really like to connect to it, but I'm fine with that for now and know that I got to fire up a proper cert or install a SSC to be able to use it without problems.

One thing I can't figure out though is the fact that I can only connect via the iOS APP if I'm using the IP of my Bitwarden host. If I'm using the DNS name it doesn't log me in. ("An Error has occured. There is a problem connecting to the server."). If I enter the DNS Name and Port it connects just fine.

Trying to figure out where the reason for this issue could be. Is the App not able to connect to a specific port while using the DNS name but when I use the IP address instead?

Originally created by @davidh2k on GitHub (Mar 24, 2019). I just installed bitwarden_rs via the Docker image from mprasil/bitwarden:latest and had some trouble connecting to it. I figured out that since its http based Google Chrome doesn't really like to connect to it, but I'm fine with that for now and know that I got to fire up a proper cert or install a SSC to be able to use it without problems. One thing I can't figure out though is the fact that I can **only** connect via the iOS APP if I'm using the IP of my Bitwarden host. If I'm using the DNS name it doesn't log me in. ("An Error has occured. There is a problem connecting to the server."). If I enter the DNS Name and Port it connects just fine. Trying to figure out where the reason for this issue could be. Is the App not able to connect to a specific port while using the DNS name but when I use the IP address instead?
GiteaMirror added the question label 2025-11-07 06:30:33 -06:00
Author
Owner

@dani-garcia commented on GitHub (Mar 24, 2019):

Can you check if you can access the web vault in safari from both the DNS name and the IP address? Also what if you use a domain like 192.168.1.50.xip.io? This should point to the 192.168.1.50 IP address. If that works then this might be a DNS problem.

We've had some issues in the past with iOS, but they were related to the use of self signed certificates, not about a difference between domain and direct IP access.

Also, as a note, if you end up using self signed certificates, you might need to install the root cert in your phone for iOS to allow it (Check this).

@dani-garcia commented on GitHub (Mar 24, 2019): Can you check if you can access the web vault in safari from both the DNS name and the IP address? Also what if you use a domain like `192.168.1.50.xip.io`? This should point to the `192.168.1.50` IP address. If that works then this might be a DNS problem. We've had some issues in the past with iOS, but they were related to the use of self signed certificates, not about a difference between domain and direct IP access. Also, as a note, if you end up using self signed certificates, you might need to install the root cert in your phone for iOS to allow it (Check [this](https://github.com/dani-garcia/bitwarden_rs/issues/304#issuecomment-453539892)).
Author
Owner

@BlackDex commented on GitHub (Mar 25, 2019):

Also check the bitwarden.log and see if there are any errors there when trying to use the dns name.
I don't know if you have used that same DNS name before and had a certificate for it and maybe enabled HTST, if that is the case the client maybe still thinks it needs to connect with https.

@BlackDex commented on GitHub (Mar 25, 2019): Also check the bitwarden.log and see if there are any errors there when trying to use the dns name. I don't know if you have used that same DNS name before and had a certificate for it and maybe enabled HTST, if that is the case the client maybe still thinks it needs to connect with https.
Author
Owner

@davidh2k commented on GitHub (Mar 25, 2019):

Yes, I can in fact open up the vault in Safari via the domain name 'host.domain.tld'. So I'm certain to say that the DNS should not be an issue. However, your suggested solution with using ip.xip.io doesn't work either in the App.

@BlackDex The log doesn't seem to pop an event when connecting via the domain name or ip.xip.io.

The error inside the app seems to be near instant too, which makes it look like the app doesn't even know what to do with the address and throws the error instantly.

@davidh2k commented on GitHub (Mar 25, 2019): Yes, I can in fact open up the vault in Safari via the domain name 'host.domain.tld'. So I'm certain to say that the DNS should not be an issue. However, your suggested solution with using `ip.xip.io` doesn't work either in the App. @BlackDex The log doesn't seem to pop an event when connecting via the domain name or `ip.xip.io`. The error inside the app seems to be near instant too, which makes it look like the app doesn't even know what to do with the address and throws the error instantly.
Author
Owner

@BlackDex commented on GitHub (Mar 25, 2019):

Maybe you can check what your phone thinks the IP should be of that DNS then.
You can try and use a tool like the following on your iOS device:
https://itunes.apple.com/us/app/inettools-ping-dns-port-scan/id561659975?mt=8
or
https://itunes.apple.com/us/app/nslookup/id423175511?mt=8

@BlackDex commented on GitHub (Mar 25, 2019): Maybe you can check what your phone thinks the IP should be of that DNS then. You can try and use a tool like the following on your iOS device: https://itunes.apple.com/us/app/inettools-ping-dns-port-scan/id561659975?mt=8 or https://itunes.apple.com/us/app/nslookup/id423175511?mt=8
Author
Owner

@davidh2k commented on GitHub (Mar 25, 2019):

Just checked via the first tool you mentioned. It actually resolves the correct IP Address.

@davidh2k commented on GitHub (Mar 25, 2019): Just checked via the first tool you mentioned. It actually resolves the correct IP Address.
Author
Owner

@mprasil commented on GitHub (Mar 25, 2019):

Are you using http or https?

@mprasil commented on GitHub (Mar 25, 2019): Are you using http or https?
Author
Owner

@davidh2k commented on GitHub (Mar 25, 2019):

http, made sure of that like three times. :D

@davidh2k commented on GitHub (Mar 25, 2019): http, made sure of that like three times. :D
Author
Owner

@BlackDex commented on GitHub (Mar 25, 2019):

If i'm correct both the Android and iOS clients need HTTPS when using a domain.
https://github.com/bitwarden/mobile/issues/425

But i'm not sure. i never tried it with http only.

@BlackDex commented on GitHub (Mar 25, 2019): If i'm correct both the Android and iOS clients need HTTPS when using a domain. https://github.com/bitwarden/mobile/issues/425 But i'm not sure. i never tried it with http only.
Author
Owner

@davidh2k commented on GitHub (Mar 25, 2019):

That is weird. A friend tried to replicate with a local installation (mine is internet hosted) and for him it actually works connecting via the hostname. But the issue you referenced even explicity spoke about local connections... I mean its just for testing now, since I had no quick way for obtaining a cert via LE.

@davidh2k commented on GitHub (Mar 25, 2019): That is weird. A friend tried to replicate with a local installation (mine is internet hosted) and for him it actually works connecting via the hostname. But the issue you referenced even explicity spoke about local connections... I mean its just for testing now, since I had no quick way for obtaining a cert via LE.
Author
Owner

@dani-garcia commented on GitHub (Mar 25, 2019):

I'm not sure why that could happen, to be honest. Is your friend also connecting using http? I know sometimes apps disallow the use of http for security reasons, but I'm not sure why they would allow an IP but not a domain name.

@dani-garcia commented on GitHub (Mar 25, 2019): I'm not sure why that could happen, to be honest. Is your friend also connecting using http? I know sometimes apps disallow the use of http for security reasons, but I'm not sure why they would allow an IP but not a domain name.
Author
Owner

@runew0lf commented on GitHub (Aug 12, 2019):

Sorry for the late reply. The I tried exactly the same thing (connecting via http) with a domain name, and it fails constantly, however when i enter the IP address, it works fine (i pinged the domain name to get the ip address)

@runew0lf commented on GitHub (Aug 12, 2019): Sorry for the late reply. The I tried exactly the same thing (connecting via http) with a domain name, and it fails constantly, however when i enter the IP address, it works fine (i pinged the domain name to get the ip address)
Author
Owner

@mprasil commented on GitHub (Nov 11, 2019):

What version of bitwarden_rs are you using?

@mprasil commented on GitHub (Nov 11, 2019): What version of `bitwarden_rs` are you using?
Author
Owner

@mprasil commented on GitHub (Nov 15, 2019):

Closing this as it is quite old issue and there have been few releases since. Feel free to reopen or open new issue if problem persists.

@mprasil commented on GitHub (Nov 15, 2019): Closing this as it is quite old issue and there have been few releases since. Feel free to reopen or open new issue if problem persists.
Author
Owner

@uwesimm commented on GitHub (Feb 8, 2020):

not sure how to reopen the issue. however i can still confirm the above. installed the app on a fresh iPhone-x ios13.3.1, bitwarden_rs lives in a docker image (http). accessing the bitwarden install from other machines via name+port works fine. one the iPhone it doesn't work via hostname but does work via ip

@uwesimm commented on GitHub (Feb 8, 2020): not sure how to reopen the issue. however i can still confirm the above. installed the app on a fresh iPhone-x ios13.3.1, bitwarden_rs lives in a docker image (http). accessing the bitwarden install from other machines via name+port works fine. one the iPhone it doesn't work via hostname but does work via ip
Author
Owner

@jjlin commented on GitHub (Feb 8, 2020):

What kind of hostnames are you guys using? Some DNS servers will sinkhole certain domains for perceived security reasons, e.g. I know OpenDNS blocks resolution of DDNS hostnames from afraid.org.

@jjlin commented on GitHub (Feb 8, 2020): What kind of hostnames are you guys using? Some DNS servers will [sinkhole](https://en.wikipedia.org/wiki/DNS_sinkhole) certain domains for perceived security reasons, e.g. I know OpenDNS blocks resolution of DDNS hostnames from afraid.org.
Author
Owner

@uwesimm commented on GitHub (Feb 8, 2020):

i have a dns server serving my domain. the iPhone is using that dns server. safari can access the server via the same url. the very same url does not work in the app. the hostname(s) used are all local in my domain (inside my local network) and only my dns server will resolve them.

@uwesimm commented on GitHub (Feb 8, 2020): i have a dns server serving my domain. the iPhone is using that dns server. safari can access the server via the same url. the very same url does not work in the app. the hostname(s) used are all local in my domain (inside my local network) and only my dns server will resolve them.
Author
Owner

@stelgenhof commented on GitHub (Dec 6, 2021):

@uwesimm @davidh2k I have been battling the same issue for the last hours, until I figured out the "Local Network" setting of my Bitwarden iOS app was switched off. Once enabled, I could successfully login to my local Vaultwarden.

You may want to check that setting :)

@stelgenhof commented on GitHub (Dec 6, 2021): @uwesimm @davidh2k I have been battling the same issue for the last hours, until I figured out the "Local Network" setting of my Bitwarden iOS app was switched off. Once enabled, I could successfully login to my local Vaultwarden. You may want to check that setting :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#261