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.

34 lines
1.3 KiB

7 months ago
7 months ago
5 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. table inet lxd {
  2. chain pstrt.lxdbr0 {
  3. type nat hook postrouting priority srcnat; policy accept;
  4. {%- if target != 'prod' %}
  5. # BLOCK SMTP PORTS
  6. tcp dport { 25, 465, 587 } ip saddr {{ firewall.bridge_subnet }} {%- if firewall.container_mail_passthrough %} ip saddr != {{ env.ip_mail_passthrough }} {% endif %} log prefix "Drop SMTP away from container: " drop
  7. {% endif -%}
  8. ip saddr {{ firewall.bridge_subnet }} ip daddr != {{ firewall.bridge_subnet }} masquerade
  9. }
  10. chain fwd.lxdbr0 {
  11. type filter hook forward priority filter; policy accept;
  12. ip version 4 oifname "lxdbr0" accept
  13. ip version 4 iifname "lxdbr0" accept
  14. }
  15. chain in.lxdbr0 {
  16. type filter hook input priority filter; policy accept;
  17. iifname "lxdbr0" tcp dport 53 accept
  18. iifname "lxdbr0" udp dport 53 accept
  19. iifname "lxdbr0" icmp type { destination-unreachable, time-exceeded, parameter-problem } accept
  20. iifname "lxdbr0" udp dport 67 accept
  21. }
  22. chain out.lxdbr0 {
  23. type filter hook output priority filter; policy accept;
  24. oifname "lxdbr0" tcp sport 53 accept
  25. oifname "lxdbr0" udp sport 53 accept
  26. oifname "lxdbr0" icmp type { destination-unreachable, time-exceeded, parameter-problem } accept
  27. oifname "lxdbr0" udp sport 67 accept
  28. }
  29. }