Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tasks/amazon_linux.yam
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
- name: Amazon Linux 2 | iptables_configure
include_tasks: configure_iptables.yaml
9 changes: 9 additions & 0 deletions tasks/configure_iptables.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- name: Allow OUTPUT on loopback interface
ansible.builtin.command: iptables -A OUTPUT -o lo -j ACCEPT
args:
warn: false

- name: Drop traffic from 127.0.0.0/8 (anti-spoofing)
ansible.builtin.command: iptables -A INPUT -s 127.0.0.0/8 -j DROP
args:
warn: false