Add firewall/iptables rules for KDE Connect ports

This commit is contained in:
Payas Relekar 2019-11-24 12:52:17 +05:30
parent f0eb27010d
commit c715bb25db

View file

@ -120,6 +120,9 @@
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Open ports for KDE Connect
networking.firewall.extraCommands = "iptables -I INPUT -i wlo1 -p udp --dport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT && iptables -I INPUT -i wlo1 -p tcp --dport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT && iptables -A OUTPUT -o wlo1 -p udp --sport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT && iptables -A OUTPUT -o wlo1 -p tcp --sport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT\n";
# Enable CUPS to print documents.
services.printing.enable = true;