Registered Member
|
Whenever I try to use KDE connect, either on my laptop or Android phone. Neither of them shows up. Both are in the same wifi. On my laptop running endevourOs, KDE Plasma, I open the Kde connect app. It looks for devices running the KDE connect app. My phone does not show up. I try the same on the phone, but the laptop does not show up. I even tried to add the device by IP. still had no luck. any solutions
|
Registered Member
|
It is probably your firewall. Oddly enough, I clearly remember adding the requisite rules to allow Kdeconnect through it and things started getting real good. However, I also clearly remember after that I had no need for a firewall as the other services I had running were stopped, uninstalled and implemented on the pfsense PC I have running, so I removed all the firewall rules and disabled the firewall and throughout that process I also removed the kdeconnect allow rule (with the intention of putting it back and re-enabling the firewall if this caused kdeconnect to break), and after saving and rebooting the PC, kdeconnect is still working as expected.
Troubleshooting Section (from https://userbase.kde.org/KDEConnect ) KDE Connect uses dynamic ports in the range 1714-1764 for UDP and TCP. So if you are behind a firewall, make sure to open this port range for both TCP and UDP. Otherwise, make sure your network is not blocking UDP broadcast packets. Check that the process is listening on the network: sudo netstat -tunelp | grep -i kdeconnect Are the ports open/blocked? netcat -z -v <your-phones-ip> 1714-1764 Example output: Connection to <your -phones-ip> 1716 port [tcp/*] succeeded! You also get lots of Connection refused, but you need 1 “succeeded” If the the network connection is not the problem, you might try starting from a clean configuration again: killall kdeconnectd mv ~/.config/kdeconnect ~/.config/kdeconnect.bak ufw If your firewall is ufw, you can open the necessary ports with: sudo ufw allow 1714:1764/udp sudo ufw allow 1714:1764/tcp sudo ufw reload firewalld If your firewall is firewalld, you can open the necessary ports with: sudo firewall-cmd --permanent --zone=public --add-service=kdeconnect sudo firewall-cmd --reload Firewall Configuration (firewall-config) Open Firewall Configuration (firewall-config). In Zones ➔ Services, check the kde-connect service. Make sure you choose the "Permanent" Configuration: option in the drop-down menu at the top, otherwise rebooting will discard your settings changes. iptables If your firewall is iptables, you can open the necessary ports with: sudo iptables -I INPUT -i <yourinterface> -p udp --dport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT sudo iptables -I INPUT -i <yourinterface> -p tcp --dport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT sudo iptables -A OUTPUT -o <yourinterface> -p udp --sport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT sudo iptables -A OUTPUT -o <yourinterface> -p tcp --sport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT
Last edited by yodamin on Thu May 11, 2023 1:31 am, edited 2 times in total.
|
Registered Member
|
Of course you will also need to allow kdeconnect through any other devices firewall. Android should be fine unless you've rooted and installed a firewall and if you've done that you should be just fine doing this.
sudo netstat -tunelp | grep -i kdeconnect tcp6 0 0 :::1716 :::* LISTEN 1000 56900 3614/kdeconnectd udp6 0 0 :::1716 |
Registered Member
|
Thank you for your help. After configuring my firewalld settings, I was able to connect successfully.
|
Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]