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.
 
 
 
 

92 rivejä
1.9 KiB

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