1
0
Fork 0

Add our standard anti-OpenAI security rules

Oh right, forgot I didn't add these here yet! Let's fix that!
This commit is contained in:
Emi Matchu 2024-01-14 06:30:56 -08:00
parent 6866826abc
commit 97d5ced04d

View file

@ -55,6 +55,25 @@
rule: allow
port: "443"
- name: Configure ufw firewall to deny access to ChatGPT-User's IP range
community.general.ufw:
rule: deny
src: 23.98.142.176/28
comment: ChatGPT-User (https://platform.openai.com/docs/plugins/bot)
- name: Load GPTBot IP ranges
uri:
url: https://openai.com/gptbot.json
register: gptbot_info
- name: Configure ufw firewall to deny access to each of GPTBot's IP ranges
community.general.ufw:
rule: deny
src: "{{ item }}"
comment: GPTBot (https://platform.openai.com/docs/gptbot)
loop: "{{ gptbot_info['json'] |
community.general.json_query('prefixes[*].ipv4Prefix') }}"
- name: Enable ufw firewall with all other ports closed by default
community.general.ufw:
state: enabled