Hello, anyone know how I can get KDE Connect to work while the firewall is on?
ChatGPT gave me this answer, but it hasn’t helped:
iptables
sudo iptables -A INPUT -p udp --dport 1714:1764 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 1714:1764 -j ACCEPT
sudo iptables-save | sudo tee /etc/iptables/rules.v4
To make your iptables rules permanent on a Linux distribution like CachyOS, you can save them to a file and configure the system to load the rules at startup. Here’s what you can do: Create the file to save the rules: It looks like you’ve already created the rules file with iptables-save, but to be sure, run the command:
Bash sudo iptables-save | sudo tee /etc/iptables/rules.v4
Load the rules automatically at startup: CachyOS uses systemd, so you can create a service to load the rules automatically. Create a systemd service to load the rules at startup: Create a new service file with the following command:
Bash sudo nano /etc/systemd/system/iptables.service
Add the following contents to the file:
ini
[Unit]
Description=Load iptables rules
Wants=network-pre.target
Before=network-pre.target
Requires=network.target
[Service]
Type=oneshot
ExecStart=/sbin/iptables-restore /etc/iptables/rules.v4
ExecReload=/sbin/iptables-restore /etc/iptables/rules.v4
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
To load and activate the service: Run the following commands to load and activate the service at startup:
Bash sudo systemctl daemon-reload
sudo systemctl enable iptables.service
sudo systemctl start iptables.service
Now your iptables rules should load automatically every time the system is rebooted.