Resolve 2 hostnames to 2 different services in the same IP

Paolo177

Dabbler
Joined
Apr 15, 2020
Messages
15
I have a jail with 2 services running in it:

Transmission (192.168.1.5:9091) and Plex(192.168.1.5:32400)

I would like to create a simple way (i.e. with hostname) to reach them without having to type their ip. I am using an OpenWRT router in case that could help.

Should I make multiple IP for 1 jail? would I then be able somehow to map the second ip to transmission Web GUI?

Which is the best solution in your opinion?

Thank you in advance!
 

Paolo177

Dabbler
Joined
Apr 15, 2020
Messages
15

Even though I read all of it, it doesn't resolve my problem in any way. If the message you are trying to convey is that what I would like to do is not possible that doesn't help me. I know it is possible to create a jail with multiple ip what I am asking is if someone knows if that is possible and maybe how to do it.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I know it is possible to create a jail with multiple IP
I believe you "know" incorrectly. But @garm has given you the (or at least, "a") correct answer--edit the hosts file on your computer to point whatever hostname(s) you want to the jail. Or (better, IMO) figure out if you can configure OpenWRT's DNS service to do that for you.
 

Paolo177

Dabbler
Joined
Apr 15, 2020
Messages
15
My bad, yeah. I took a too speedy look at this. The solution to edit the hostname in my PC isn't the way, there are too many PC and I can't do it for any other PC that will connect to my network. Understood the way is just to work on OpenWRT, Thank You! :)
 

styno

Patron
Joined
Apr 11, 2016
Messages
466
Of course OpenWRT is able to do DHCP and DNS out of the box. It's right there: click "network", then click "DHCP and DNS".
I actually got confused by the question thinking that OP wanted to have 'just' two different DNS names without adding the port numbers and was about to suggest port forwarding or a reverse proxy.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Keep in mind that DNS resolution won't include the ports--you'll still need to go to http://plex:32400/web. If you want to avoid the need for that, you'll need a reverse proxy instead. See, e.g.:
 

Paolo177

Dabbler
Joined
Apr 15, 2020
Messages
15
I don't think this is the right place for this conversation as it doesn't really relate to FreeNAS but just to colse it:
I am currently working to find a solution to my problem, I have found something that seems to be what I need here. And I am currently asking it on the OpenWRT forum here, if there will be any update or solution I'll post only there.
 

proto

Patron
Joined
Sep 28, 2015
Messages
269
and you will find that you need a dns + reverse proxy here and there.
rfc2782 is your friend.
 
Last edited:

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
as soon as it’s multiple clients and servers, the cost of a reverse proxy starts making sense
 

proto

Patron
Joined
Sep 28, 2015
Messages
269
I'm quite happy running my own PowerDNS (auth + resolver) for internal hosts* + PFSense.
* some of them are internal webservers with LE Certs.
 

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
I'm not sure what all the debate -- you need a DNS host override at the router level (or could do an /etc/hosts modification for each client), and a reverse proxy. Fairly simple to over come.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
you need a DNS host override at the router level (or could do an /etc/hosts modification for each client), and a reverse proxy.
You only need the reverse proxy if you want to dispense with the non-standard ports, which wasn't explicitly part of OP's question.
 
Top