Browse Source

transmission-remote

main
pvincent 7 months ago
parent
commit
2a998e54f5
  1. 6
      lib/functions.sh
  2. 6
      templates/nftables/firewall.table.j2

6
lib/functions.sh

@ -114,6 +114,7 @@ function prepare_nftables() {
current_target="${TARGET:-not_defined_yet}"
desktop=false
samba=false
transmission_daemon=false
if [[ $current_target == not_defined_yet ]]; then
echo -n "generating new firewall table first time... "
else
@ -124,7 +125,10 @@ function prepare_nftables() {
if exist_command 'smbstatus'; then
samba=true
fi
echo -n "generating new firewall table according to target=<${current_target}>, desktop=<$desktop>, samba=<$samba> ..."
if exist_command 'transmission-daemon'; then
transmission_daemon=true
fi
echo -n "generating new firewall table according to target=<${current_target}>, desktop=<$desktop>, samba=<$samba>, transmission_daemon=<$transmission_daemon> ..."
else
echo -n "generating new firewall table according to target=<${current_target}>..."
fi

6
templates/nftables/firewall.table.j2

@ -33,6 +33,12 @@ table inet firewall {
tcp dport netbios-ssn accept comment "Accept NetBIOS Session Service (smbd)"
tcp dport microsoft-ds accept comment "Accept Microsoft Directory Service (smbd)"
{%- endif %}
{%- if env.transmission_daemon == 'true' %}
# allow TRANSMISSION-REMOTE
tcp dport 9091 accept comment "Accept Transmission Remote Service"
{%- endif %}
{%- endif %}
{%- endif %}
}

Loading…
Cancel
Save