Hi
I run several services on my server through docker containers and currently access these services using the IP address of the server followed by the port number. Is there a way to arrange it so that I can access the services locally using container names? For example if I want to access my Plex container, typing plex.local instead of the IP address? Fairly new to opnsense so sorry if the question is silly or basic, TIA
Services --> Unbound DNS --> Overrides.
Thanks for the reply
There's two options, host overrides or domain overrides. I'm assuming it is domain override that i need and i tried adding a domain (test.local) and then put in the IP address and port for an example service and then clicked save + apply however visiting test.local in my browser didn't bring up the service. Am i doing something wrong?
Quote from: rama3124 on July 12, 2023, 02:56:51 PM
Am i doing something wrong?
Yes.
You should use Host override.
A little more specific:
Services -> Unbound DNS -> Overrides
add the hostname of your Plex container as "Domain", Type normally "A" if using IPv4 and the IP address. Should work then (...after pressing APPLY)... :-)
Still not working so i'm definitely missing something here. I am running plex container on my Unraid server and usually access the service with IPADDRESSOFUNRAID:PORT but can't add port numbers to host override so filled out the fields like this but it doesn't seem to function:
Host: plex.local
Domain (name of my container): plex
Type: A
IP: IPRADDRESSOFUNRAID
What am i doing wrong now? Also regarding using the plex container name, docker containers are on a custom docker network on my unraid server so not sure if this affects things
Thanks again for all the help
Quote from: rama3124 on July 12, 2023, 11:16:50 AM
Is there a way to arrange it so that I can access the services locally using container names? For example if I want to access my Plex container, typing plex.local instead of the IP address?
Maybe with a reverse proxy like ha-proxy but it is not that easy to configure.
Quote from: rama3124 on July 13, 2023, 10:26:35 AM
Still not working so i'm definitely missing something here. I am running plex container on my Unraid server and usually access the service with IPADDRESSOFUNRAID:PORT but can't add port numbers to host override so filled out the fields like this but it doesn't seem to function:
Host: plex.local
Domain (name of my container): plex
Type: A
IP: IPRADDRESSOFUNRAID
What am i doing wrong now? Also regarding using the plex container name, docker containers are on a custom docker network on my unraid server so not sure if this affects things
Thanks again for all the help
Host: empty
Domain: plex.local
maybe?
Start with something like
ssh plex.local
...if ssh is enabled on the container, for sure.