Saltstack Official UFW Formula
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.

43 lines
839B

  1. ufw:
  2. enabled: True
  3. services:
  4. # Allow 80/tcp (http) traffic from only two remote addresses.
  5. http:
  6. protocol: tcp
  7. from_addr:
  8. - 10.0.2.15
  9. - 10.0.2.16
  10. # Allow 443/tcp (https) traffic from network 10.0.0.0/8 to an specific local ip.
  11. https:
  12. protocol: tcp
  13. from_addr:
  14. - 10.0.0.0/8
  15. to_addr: 10.0.2.1
  16. # Allow from a service port.
  17. smtp:
  18. protocol: tcp
  19. # Allow from an specific port, by number.
  20. 139:
  21. protocol: tcp
  22. # Allow from a range of ports, udp.
  23. "10000:20000":
  24. protocol: udp
  25. # Allow from two specific ports, udp.
  26. "30000,40000":
  27. protocol: udp
  28. # Allow an application defined at /etc/ufw/applications.d/
  29. applications:
  30. - OpenSSH
  31. # Allow all traffic in on the specified interface
  32. interfaces:
  33. - eth1