In our LAN I have several services running in multiple hosts, and clients using DHCP with dnsmasq
.
My goal is that any user can type a single letter (e.g. c
) in the browser search bar and get in return the HTTP response of a local HTTP server at 192.168.2.120.
What I've done so far:
dnsmasq.conf
file in the DHCP LAN server:
# (c.com is an example)
# The idea of the below is that clients will append c.com to DNS lookups when they look up for "c"
dhcp-option=option:domain-name,c.com
dhcp-option=option:domain-search,c.com
/etc/hosts
in the DHCP server:
192.168.2.120 c.c.com c.com
What's working:
- I've confirmed with
tcpdump
that the clients receive the options in the DHCP response. curl c
,curl c.c.com
, andcurl c.com
all work fine. They all point to 192.168.2.120 and get the expected HTTP traffic.
However, typing "c" in the browser bar triggers a Google search (tested in Firefox/Edge/Chrome). It works only if I type "http://c".
What else I'm missing so that internet browsers can work like curl
, and don't trigger a search? I know it's possible because I've seen it implemented in some workplaces. I'm missing some part of the puzzle.