The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
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.
 
 
 
 

89 line
1.7 KiB

  1. - name: Allow all from local
  2. iptables:
  3. chain: INPUT
  4. in_interface: lo
  5. jump: ACCEPT
  6. comment: Allow all from local
  7. become: yes
  8. - name: Allow related and established connections
  9. iptables:
  10. chain: INPUT
  11. ctstate: ESTABLISHED,RELATED
  12. jump: ACCEPT
  13. comment: Allow related and established connections
  14. become: yes
  15. - name: Allow SSH
  16. iptables:
  17. chain: INPUT
  18. protocol: tcp
  19. destination_port: 22
  20. ctstate: NEW
  21. syn: match
  22. jump: ACCEPT
  23. comment: Accept new SSH connections
  24. become: yes
  25. when: fw_enable_ssh
  26. - name: Allow HTTP
  27. iptables:
  28. chain: INPUT
  29. protocol: tcp
  30. destination_port: 80
  31. ctstate: NEW
  32. syn: match
  33. jump: ACCEPT
  34. comment: Accept new HTTP connections
  35. become: yes
  36. when: fw_enable_http
  37. - name: Allow HTTPS
  38. iptables:
  39. chain: INPUT
  40. protocol: tcp
  41. destination_port: 443
  42. ctstate: NEW
  43. syn: match
  44. jump: ACCEPT
  45. comment: Accept new HTTPS connections
  46. become: yes
  47. when: fw_enable_http
  48. - name: Allow admin HTTPS on port {{ ssl_port }}
  49. iptables:
  50. chain: INPUT
  51. protocol: tcp
  52. destination_port: "{{ ssl_port }}"
  53. ctstate: NEW
  54. syn: match
  55. jump: ACCEPT
  56. comment: Accept new admin HTTPS connections
  57. when: fw_enable_admin
  58. become: yes
  59. - name: Drop everything else
  60. iptables:
  61. chain: INPUT
  62. jump: DROP
  63. comment: Drop anything else
  64. become: yes
  65. - name: Creates /etc/iptables directory
  66. file:
  67. path: /etc/iptables
  68. state: directory
  69. - name: save iptables v4 rules
  70. shell: iptables-save > /etc/iptables/rules.v4
  71. become: yes
  72. - name: save iptables v6 rules
  73. shell: ip6tables-save > /etc/iptables/rules.v6
  74. become: yes
  75. - supervisorctl:
  76. name: bubble_peer_manager
  77. state: restarted
  78. when: fw_enable_admin