The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 

119 wiersze
2.4 KiB

  1. - name: Install firewall packages
  2. apt:
  3. name: [ 'haveged', 'iptables-persistent', 'netfilter-persistent', 'autossh' ]
  4. state: present
  5. update_cache: yes
  6. - name: Flush iptables
  7. iptables:
  8. flush: true
  9. become: yes
  10. - name: Flush INPUT chain
  11. iptables:
  12. chain: INPUT
  13. flush: yes
  14. become: yes
  15. - name: Flush OUTPUT chain
  16. iptables:
  17. chain: OUTPUT
  18. flush: yes
  19. become: yes
  20. - name: Flush iptables nat table
  21. iptables:
  22. flush: yes
  23. table: nat
  24. become: yes
  25. - name: Flush iptables mangle table
  26. iptables:
  27. flush: true
  28. table: mangle
  29. become: yes
  30. - name: Flush iptables raw table
  31. iptables:
  32. flush: true
  33. table: raw
  34. become: yes
  35. - name: Flush OUTPUT chain NAT table
  36. iptables:
  37. chain: OUTPUT
  38. table: nat
  39. flush: yes
  40. become: yes
  41. - name: Flush FORWARD chain
  42. iptables:
  43. chain: FORWARD
  44. flush: yes
  45. become: yes
  46. - name: Flush PREROUTING chain NAT Table
  47. iptables:
  48. chain: PREROUTING
  49. table: nat
  50. flush: yes
  51. become: yes
  52. - name: Delete ufw chains
  53. command: "bash -c 'iptables -F {{ item }} && iptables -X {{ item }} || echo \"chain not found: {{ item }}\"'"
  54. with_items:
  55. - ufw-after-forward
  56. - ufw-after-input
  57. - ufw-after-logging-forward
  58. - ufw-after-logging-input
  59. - ufw-after-logging-output
  60. - ufw-after-output
  61. - ufw-before-forward
  62. - ufw-before-input
  63. - ufw-before-logging-forward
  64. - ufw-before-logging-input
  65. - ufw-before-logging-output
  66. - ufw-before-output
  67. - ufw-reject-forward
  68. - ufw-reject-input
  69. - ufw-reject-output
  70. - ufw-track-forward
  71. - ufw-track-input
  72. - ufw-track-output
  73. - name: Install port manager
  74. copy:
  75. src: bubble_peer_manager.py
  76. dest: /usr/local/bin/bubble_peer_manager.py
  77. owner: root
  78. group: root
  79. mode: 0555
  80. when: fw_enable_admin
  81. - name: Install supervisor conf file for port manager
  82. copy:
  83. src: supervisor_bubble_peer_manager.conf
  84. dest: /etc/supervisor/conf.d/bubble_peer_manager.conf
  85. when: fw_enable_admin
  86. - include: sage.yml
  87. when: install_type == 'sage'
  88. - name: Creates /etc/iptables directory
  89. file:
  90. path: /etc/iptables
  91. state: directory
  92. - name: save iptables v4 rules
  93. shell: iptables-save > /etc/iptables/rules.v4
  94. become: yes
  95. - name: save iptables v6 rules
  96. shell: ip6tables-save > /etc/iptables/rules.v6
  97. become: yes
  98. - supervisorctl:
  99. name: bubble_peer_manager
  100. state: restarted
  101. when: fw_enable_admin