I installed AdGuard Home and ran this script. Then I realized I needed to assign static IPs to my clients in order to setup filters for certain devices, so I did that through LuCI. Now I'm able to connect to most devices on my network with just the hostname but not the router itself, e.g. ssh laptop
works but instead of ssh root@openwrt
I have to use ssh root@192.168.1.1
.
Here's my /etc/config/dhcp including an example of one of the clients with a static IP:
config dnsmasq
option domainneeded '1'
option localise_queries '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option localservice '1'
option ednspacket_max '1232'
option cachesize '1000'
option rebind_protection '0'
option port '54'
list server '192.168.1.1'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option ra_slaac '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
list dhcp_option '6,192.168.1.1'
list dhcp_option '3,192.168.1.1'
list dns 'fd18:f31f:2604::1'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
config host
option name 'laptop'
option dns '1'
option mac 'AA:BB:CC:DD:EE:FF'
option ip '192.168.1.100'
Is it simply a matter of adding a host config for the router itself? Just seems weird since I didn't need to do that in the past.