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.
 
 
 
 

59 line
1.3 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. - sysctl:
  5. name: net.ipv4.ip_forward
  6. value: 1
  7. sysctl_set: yes
  8. - sysctl:
  9. name: net.ipv6.conf.all.forwarding
  10. value: 1
  11. sysctl_set: yes
  12. - sysctl:
  13. name: net.ipv4.conf.all.send_redirects
  14. value: 0
  15. sysctl_set: yes
  16. - name: "Allow MITM private port"
  17. iptables:
  18. chain: INPUT
  19. action: insert
  20. rule_num: 10
  21. protocol: tcp
  22. destination_port: "{{ mitm_port }}"
  23. ctstate: NEW
  24. syn: match
  25. jump: ACCEPT
  26. comment: Accept new local TCP DNS connections on private port
  27. become: yes
  28. - name: Route port 80 through mitmproxy
  29. iptables:
  30. table: nat
  31. chain: PREROUTING
  32. action: insert
  33. rule_num: 1
  34. protocol: tcp
  35. destination_port: 80
  36. jump: REDIRECT
  37. to_ports: "{{ mitm_port }}"
  38. - name: Route port 443 through mitmproxy
  39. iptables:
  40. table: nat
  41. chain: PREROUTING
  42. action: insert
  43. rule_num: 2
  44. protocol: tcp
  45. destination_port: 443
  46. jump: REDIRECT
  47. to_ports: "{{ mitm_port }}"
  48. - name: save iptables rules
  49. shell: iptables-save > /etc/iptables/rules.v4
  50. become: yes
  51. - name: save iptables v6 rules
  52. shell: ip6tables-save > /etc/iptables/rules.v6
  53. become: yes