Make Cloudron only available in the local network
-
Hey, I've read through quite a few forum posts here about making Cloudron only available locally. I don't know if it just doesn't work network-wise, but should it actually work with these steps?
- change the static IP to the local network address e.g. 192.169.178.233
- DNS Sync
Do I need to pay attention to anything else?
Because this simple thought only leads to this error message DNS_PROBE_FINISHED_NXDOMAIN.
Is it even possible to resolve the domains directly to the local IPv4 address?
Or do you have to add/change any configurations in /etc/hosts?
Edit: I use a Progammatic DNS, not a manual one. This runs via API and therefore does not need port 80 or similar. My Cloudron server is currently running as a publicly accessible instance, but I only want to make it private. What I have tried so far was to remove ipv6 first, as already described, set the IPV4 address from public to static and enter the locally assigned Ipv4 address. After the DNS Sync I get the error message that it cannot resolve the domains DNS_PROBE_FINISHED_NXDOMAIN.
-
@ByMynix that sounds about right. Some notes:
- When you change to static IP, it will also use this IP for the DNS. So
app.domain.com
will resolve to the internal LAN IP. This is not a problem, per se. Just something for you to be aware of. - DNS Sync only works if you use programmatic DNS providers. If you use wildcard and manual, it won't be of much use.
- Cloudron can get valid certs with internal IPs only when using programmatic DNS providers. I highly recommend not using self signed certs for internal networks. All sorts of apps and desktop browsers fail these days with self signed certs and not to mention OIDC integration in Cloudron will not work reliably.
DNS_PROBE_FINISHED_NXDOMAIN
- where are you getting this error? In the browser? This could be a simple DNS caching issue really. Have you tried restarting the browser?
No need to change /etc/hosts etc, what you did is sufficient. Just make sure that in your router you have assigned Cloudron VM the static IP.
- When you change to static IP, it will also use this IP for the DNS. So
-
I missed your edit that you already use programmatic DNS, so please ignore some of my notes
-
@ByMynix said in Make Cloudron only available in the local network:
DNS_PROBE_FINISHED_NXDOMAIN
This is how I would debug this. On your laptop/PC, try to resolve the DNS. I use the
host
command for this on linux.host my.domain.com
should return192.169.178.233
in your case. Does it? -
-
@girish That's right, that's what it says. Thank you for the detailed answer. I've now tried it again and it wasn't actually the DNS cache, but the automatic DNS server that was causing problems. So far everything is working and everything is fixed. Really nice what Cloudron can offer all in one.
-