This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Not being able to connect.

Tags: None
(comma "," separated)
pnv
Registered Member
Posts
2
Karma
0

Not being able to connect.

Wed May 10, 2023 9:22 am
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 ???
yodamin
Registered Member
Posts
9
Karma
0

Re: Not being able to connect.  Topic is solved

Thu May 11, 2023 1:23 am
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.
yodamin
Registered Member
Posts
9
Karma
0

Re: Not being able to connect.

Thu May 11, 2023 1:25 am
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
pnv
Registered Member
Posts
2
Karma
0

Re: Not being able to connect.

Thu May 11, 2023 1:52 pm
Thank you for your help. After configuring my firewalld settings, I was able to connect successfully. :)


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]