How to setup a local domain

I would like to have a home domain. I have a webdomain which i Would like using with ssl for my docker services

Public website on a foraign shared hoster: example.com
all devices (LAN,WLan,VPN) should get a name like device.d.example.com
all docker services should get nextcloud.l.example.com and should be redirected by the reverseproxy from my synology nas.

How do I configure that in my Turris omnia to get the Domaisn work. (ignore ssl for this question)

In current version of OpenWRT underneat you may set multiple instances of dnsmasq each serving own network/domain. I wanted to do the same but not sure how will that influence Turris part of the OS

Also notice that network domain is not the same as DNS name and also not the same as AD domain.

Well, on Turris OS dnsmasq doesn’t do DNS. (by default, you can fiddle with anything, of course)

1 Like

Yeah but it does do dhcp and search domain what the OP is asking for is part done by dnsmasq

Seems a more complicate task then assumed. I’m not a network specialist with no knowledge in dnsmasq. Until now I was able to do anything with Luci and some google search.
I found a page, that luci not work with DNS/DHCP configuration because of knot.

You can do this in LuCi. Go to Network-> DHCP and DNS

At the very bottom you will have empty text field with the button add next to it.

So write the lets say Internal-d and click add it will make a new instance of dnsmasq. Make sure to fill in “Resolve this locally” and “Local domain” so l.example.com. Then in the devices tab make sure it listens only on your lan interface you want to serve this search domain and the same for l.example.com domain make sure it listens only on docker interface etc. With docker it might not be that simple tho.

Do this on your own. Experiment. Make a snapshot before.

Thanks for your advices. I will try it acording that.

Do you know how I create an Interface for speciific devices?
I have IP ranges for Server and clients and some other devices and wish to split them into their own interfaces.

@AreYouLoco and @Mannshoch

I doubt, that you can do this on Omnia in LuCi.
I had a bunch of production servers in a server housing behind Turris Omnia.
Which worked quite well. In the photo is Omnia at the top.

And to use this Omnia as a local DNS server,
with local resolution of a fully qualified local domain names
(we are using something.localdomain
we had problems with some linux/macos/windows using .lan .local or .domain)
because of Knot-resolver running on Omnia as the default DNS server,
we had to do it this way:
Knot resolver (i.e. kresd) - DNS advanced settings for Omnia and MOX [Turris wiki]
but things change pretty quickly and I could be wrong

modify /etc/config/resolver
section config resolver 'kresd'
add list hostname_config '/etc/hosts'
modify /etc/hosts the usual way

Another solution is to swap TurrisOS for plain vanilla OpenWRT
or use onother dns server instead of knot-resolver.

1 Like

I didn’t understand exactly what you want to achieve.
Try using VLAN’s
or split the default LAN bridge into different interfaces with their own firewall zones
using routes or NATing

According to your first post I think:
You have a public IP or more on the WAN interface.
Your LAN is on a private IP range with a firewall NAT?
(No problem to do just routing and have a bunch of public IP’s on LAN)
There is at least one fully qualified domain name pointing at the public IP.
(Are you hosting your own authoritative DNS server or using an external?)
There is a reverse proxy server behind your firewall, serving requests
for different domain names and requests coming from the internet and local net?
Or it is just a sulution for serving requests from the local net
and overwriting some domain names with specific local IP’s.

I have many different solutions running for different clients with different needs.
And i use TurrisOS, OpenWRT or OPNSense.
So if you describe bether what is your goal, i could give you some advice.

Well I am using same approach for my Kubernetes cluster

1 Like