I’m currently running OSMC 2024.10-1 on a Vero 4K+, and would like to set the DNS search domain (.lan
) in order to resolve names on my local network (e.g. vero4k.lan
).
Looking at /etc/resolv.conf
, I can see it’s managed by Connection Manager.
osmc@osmc:~$ cat /etc/resolv.conf
# Generated by Connection Manager
nameserver ::1
nameserver 127.0.0.1
I’ve configured a static IP via the My OSMC GUI, which is reflected by the connmanctl
output.
osmc@osmc:~$ connmanctl services ethernet_c44eac28xxxx_cable
/net/connman/service/ethernet_c44eac28xxxx_cable
Type = ethernet
Security = [ ]
State = online
Favorite = True
Immutable = False
AutoConnect = True
Name = Wired
Ethernet = [ Method=auto, Interface=eth0, Address=C4:4E:AC:28:xx:xx, MTU=1500 ]
IPv4 = [ Method=manual, Address=10.0.1.252, Netmask=255.255.255.0, Gateway=10.0.1.1 ]
IPv4.Configuration = [ Method=manual, Address=10.0.1.252, Netmask=255.255.255.0, Gateway=10.0.1.1 ]
IPv6 = [ ]
IPv6.Configuration = [ Method=off ]
Nameservers = [ 10.0.1.249 ]
Nameservers.Configuration = [ 10.0.1.249 ]
Timeservers = [ ]
Timeservers.Configuration = [ ]
Domains = [ ]
Domains.Configuration = [ ]
Proxy = [ Method=direct ]
Proxy.Configuration = [ ]
mDNS = False
mDNS.Configuration = False
Provider = [ ]
Based on the man page, I should be able to set the search domain using the --domains
argument (“Set the list of search domains, separated by spaces.”).
osmc@osmc:~$ connmanctl config ethernet_c44eac28xxxx_cable --domains 'lan'
osmc@osmc:~$ connmanctl services ethernet_c44eac28xxxx_cable
/net/connman/service/ethernet_c44eac28xxxx_cable
Type = ethernet
Security = [ ]
State = online
Favorite = True
Immutable = False
AutoConnect = True
Name = Wired
Ethernet = [ Method=auto, Interface=eth0, Address=C4:4E:AC:28:xx:xx, MTU=1500 ]
IPv4 = [ Method=manual, Address=10.0.1.252, Netmask=255.255.255.0, Gateway=10.0.1.1 ]
IPv4.Configuration = [ Method=manual, Address=10.0.1.252, Netmask=255.255.255.0, Gateway=10.0.1.1 ]
IPv6 = [ ]
IPv6.Configuration = [ Method=off ]
Nameservers = [ 10.0.1.249 ]
Nameservers.Configuration = [ 10.0.1.249 ]
Timeservers = [ ]
Timeservers.Configuration = [ ]
Domains = [ lan ]
Domains.Configuration = [ lan ]
Proxy = [ Method=direct ]
Proxy.Configuration = [ ]
mDNS = False
mDNS.Configuration = False
Provider = [ ]
However, the setting doesn’t seem to have any effect (even after restarting connman.service
) as resolv.conf
doesn’t include the search
directive, and I can only query names with the local domain suffixed:
osmc@osmc:~$ host vero4k.lan
vero4k.lan has address 10.0.1.252
osmc@osmc:~$ host vero4k
Host vero4k not found: 3(NXDOMAIN)
I’ve also set the search domain as a DHCP option (119) on my DHCP server, but it doesn’t seem to get picked up by Connection Manager either if I switch to a dynamic IP address. The search domain seems to be set OK by other Linux and Mac clients on the network.
Are search domains not supported on OSMC, or is there some setting and/or mechanism I’m not aware of? Thanks!