Local Network qubes.local domain like raspberrypi.local

Hello!

Thank you for reading! I plan to publish my setup once it works to help others.

I want to use the keyboard and mouse on my Qubes machine to control other machines in my lab.
I set up Barrier and got everything working, and it was really nice!
Everything works!

Then my router gave my Qubes machine a different IP (192.168.0.XX) and now my hardcoded scripts need to be adapted.
Instead of using a numeric IP, I want to use a .local domain so I don’t need to update my scripts again. I have my raspi on raspberrypi.local using avahi, so I know it’s possible.

I tried installing / starting / restarting avahi-daemon.service in sys-net, but I know I’m missing a piece of the puzzle. What else must I do? Please help :slight_smile:

Has anyone ever got a qubes machine on the local network with an address like qubes-machine.local?

Thank you!

I’ve been trying to get mDNS to work as well, without success.

In the sys-net qube, I ran:

sudo systemctl enable avahi-daemon
and
sudo systemctl start avahi-daemon

However, when trying to send pings to servers on the network that also use mDNS, ie:
ping raspberrypi.local I just get:
ping: rasperrypi.local: Name or service not known
But using the IP of the server for the ping works.

I ran these tests from the sys-net qube, figuring that if I can’t get it working here it won’t work in any of the qubes that inheret networking from this qube anyway.

Anyone have any ideas?

Unlike op, I’m not really trying to broadcast a qubes hostname, but I would like qubes to be able to send and recieve mDNS requests, so that in say, a personal qube, I can run ssh raspberrypi.local and it will resolve the correct IP address under the hood.

To that end, I modified the avahi-daemon conf a bit to prevent broadcasting info I’d rather not be made available to other servers on the network.

My /etc/avahi/avahi-daemon.conf looks like this:

# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with avahi; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.

# See avahi-daemon.conf(5) for more information on this configuration
# file!

[server]
#host-name=foo
#domain-name=local
#browse-domains=0pointer.de, zeroconf.org
use-ipv4=yes
use-ipv6=yes
#allow-interfaces=eth0
#deny-interfaces=eth1
#check-response-ttl=no
#use-iff-running=no
#enable-dbus=yes
#disallow-other-stacks=no
#allow-point-to-point=no
#cache-entries-max=4096
#clients-max=4096
#objects-per-client-max=1024
#entries-per-entry-group-max=32
ratelimit-interval-usec=1000000
ratelimit-burst=1000

[wide-area]
enable-wide-area=yes

[publish]
disable-publishing=yes
disable-user-service-publishing=yes
#add-service-cookie=no
publish-addresses=no
publish-hinfo=no
publish-workstation=no
publish-domain=no
#publish-dns-servers=192.168.50.1, 192.168.50.2
#publish-resolv-conf-dns-servers=yes
#publish-aaaa-on-ipv4=yes
#publish-a-on-ipv6=no

[reflector]
enable-reflector=yes
#reflect-ipv=no

[rlimits]
#rlimit-as=
#rlimit-core=0
#rlimit-data=8388608
#rlimit-fsize=0
#rlimit-nofile=768
#rlimit-stack=8388608
#rlimit-nproc=3

I enabled the reflector, and turned off several options related to broadcasting, but do not think these are the causes of mDNS not working, since I made these changes after initially turning avahi-daemon on.

Any suggestions greatly appreciated.