Hi;
I’ve followed these steps for enabling avahi:
You can use mDNS and Avahi, part of Fedora Workstation by default, to provide host names so you can easily use all your local systems. Learn how here.
Est. reading time: 3 minutes
My computer’s name is fedora, and I can ping it with ping fedora.local
. But, whenever I ping from my mobile phone with termux, it don’t works. Also I tried to start a flask http server with 0.0.0.0:5000
and accessing it in my mobile phone with fedora.local:5000
but it don’t working.
How can I fix this problem?
Edit: Starting flask server on fedora.local:5000
also not working on phone.
1 Like
vgaetera
(Vladislav Grigoryev)
February 14, 2021, 9:36am
2
Prerequisites:
Your phone must support name resolution with mDNS.
You should be connected to the same broadcast domain with the target host.
Firewall on the router must allow intra-zone forwarding.
An alternative method better suited for Fedora 33:
# Configure firewall
sudo firewall-cmd --permanent --add-service=mdns
sudo firewall-cmd --reload
# Configure systemd-resolved
sudo mkdir -p /etc/systemd/resolved.conf.d
sudo tee /etc/systemd/resolved.conf.d/00-custom.conf << EOF > /dev/null
[Resolve]
MulticastDNS=yes
EOF
sudo systemctl restart systemd-resolved.service
# Configure NetworkManager
sudo tee /etc/NetworkManager/conf.d/00-custom.conf << EOF > /dev/null
[connection]
connection.mdns=2
EOF
sudo systemctl restart NetworkManager.service
1 Like
tee: /etc/systemd/resolved.conf.d/00-custom.conf: No such file or directory
Yes, both 2 device is connected to same network.
How can I learn if so or not?
Oh, my router don’t have settings about firewall. Just there is a enable/disable section like this:
Am I should to disable it?
vgaetera
(Vladislav Grigoryev)
February 14, 2021, 10:05am
4
sudo mkdir -p /etc/systemd/resolved.conf.d
Run Wireshark on your PC and filter the mdns
traffic.
Then try to ping the pc-name.local
from your phone.
2 Likes
system
(system)
Closed
March 14, 2021, 10:05am
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.