How to get local ip address resolution inside local network for full domain name

I have http server on machine inside local network(actually in LXC) and added CNAME record to DNS for my domain to point to wan address of TO where I forward ports to this local machine. Connection from outside is OK nevertheless i can not connect from inside network using full domain name - I got always router admin page.
I try several different settings but did not succeed.
Can someone explain me how to properly set this please.

1 Like

Can somebody help me uderstand what I’m doing wrong please :
I revert all settings for knot and unbound - all is in standard (i believe)
I added host name for my server to /etc/hosts with full domain name (192.168.x.x
I have CNAME record in provider DNS pointing this to

now when I check DNS record with nslookup i got this answer on linux:
Non-authoritative answer: canonical name =

on windows:
Non-authoritative answer:
Addresses: xxxx:xxxx:xxxx:xxxx::1 - ipv6 of router - external ip of router

ping from windows always point me to external address of router (, on linux ping to point sometimes to internal address and sometimes to external address of router.

How to set kresd to use only internal data (from /etc/hosts) when dns request for is coming from local network?
Thank you.

Hi kukulin,
I am not positive this will work - I am just figuring out kresd, myself.
By /etc/hosts, you are referring to the one on your Turris router, right?
Double check that this line is somewhere in /etc/init.d/kresd
Then restart kresd:
/etc/init.d/kresd restart

I found that anytime I change one of the hint files (I have /tmp/hosts/dhcp as a hint, too), kresd has to be restarted.

Good luck.

Hi Snowkeep,

thank you for support.

Yes I refer to /etc/hosts on Omnia.
I do not have hints.config(‘/etc/hosts’) in /etc/init.d/kresd
But I can see it inside generated config : /tmp/kresd.config
at the beginning of hints:

hints['openhab.lan'] = ''
hints['TITAN.lan'] = ''
hints['srv.lan'] = ''

I also added manually hint :
hints[''] = ''
with same IP address as srv.lan to /etc/kresd.custom.conf
and add option include_config ‘/etc/kresd.custom.conf’ inside /etc/config/resolver in section config resolver ‘kresd’

result is same :frowning:

1 Like

I suspect it has to do something with CNAME record - I just deleted this record in DNS and add A record updated via DDNS (I use DNS service)

So I have now 2 DDNS settings in omnia :

    I can not chack now windows machine but all my linux hosts on internal network start to regularly answer correct ip for and nslookup and DIG stopped to show instead of
    I’ll confirm if this is ok also on windows host evening when come back home.

So no - windows are still showing external address of router in nslookup even CNAME disappeared.
I surrender for now :frowning: - add this host name to hosts file on windows pc’s

@kukulin, that sounds like the windows box(es) use a diferent DNS than the Omnia box.

As for CNAMEs, the hints are only used before any resolution (forwarding or iteration), so you have to explicitly provide hints for all aliases that you want redirected.