Sample Header Ad - 728x90

How do I access device using hostname that is hosting an access point?

0 votes
0 answers
179 views
I have an embedded linux device hosting an access point, I set it up like this:
sudo apt install dnsmasq-base -y
nmcli connection add type wifi ifname wlan0 con-name access_point autoconnect yes ssid my_ssid
nmcli connection modify access_point 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli connection modify access_point wifi-sec.key-mgmt wpa-psk
nmcli connection modify access_point wifi-sec.psk "my_password"
nmcli connection up access_point
I am able to connect to the access point and get an IP address. I am then able to ssh to the device hosting the access point using IP like:
ssh user@IP
I want to host a small web server on the embedded device that devices can access while connected to the access point. I would like to be able to hit the server with a hostname rather than an IP. Is this possible with only making changes to the embedded device, I don't want each device that connects to the access point to have to put an entry in their hosts file for example.
Asked by av4625 (101 rep)
Mar 27, 2023, 12:41 PM