provisioning tool for building opinionated architecture
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.3 KiB

7 months ago
5 months ago
7 months ago
5 months ago
5 months ago
7 months ago
  1. table inet firewall {
  2. chain input {
  3. type filter hook input priority 0; policy drop;
  4. # established/related connections
  5. ct state established,related accept
  6. # loopback + lxdbr0 interface
  7. iifname lo accept
  8. iifname lxdbr0 accept
  9. # icmp
  10. icmp type echo-request accept
  11. # allow SSH + GITEA + NGINX
  12. tcp dport {22, 2222, 80, 443} accept
  13. {%- if env.target == 'dev' %}
  14. {%- if env.desktop == 'true' %}
  15. # DESKTOP RULES BELOW
  16. # -------------------
  17. # allow mDNS
  18. udp dport mdns accept
  19. {%- if env.samba == 'true' %}
  20. # allow SAMBA
  21. udp dport netbios-ns accept comment "Accept NetBIOS Name Service (nmbd)"
  22. udp dport netbios-dgm accept comment "Accept NetBIOS Datagram Service (nmbd)"
  23. tcp dport netbios-ssn accept comment "Accept NetBIOS Session Service (smbd)"
  24. tcp dport microsoft-ds accept comment "Accept Microsoft Directory Service (smbd)"
  25. {%- endif %}
  26. {%- if env.transmission_daemon == 'true' %}
  27. # allow TRANSMISSION-REMOTE
  28. tcp dport 9091 accept comment "Accept Transmission Remote Service"
  29. {%- endif %}
  30. {%- endif %}
  31. {%- endif %}
  32. }
  33. }