-
Notifications
You must be signed in to change notification settings - Fork 2
/
AFTR.yml
102 lines (86 loc) · 2.16 KB
/
AFTR.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
- hosts: localhost
any_errors_fatal: true
gather_facts: no
tasks:
- name: Update the machine
tags: upd
yum:
update_only: yes
- name: Install General Essential packages
tags: essentials
yum:
name:
- nano
- net-tools
- tcpdump
- nmap
- wireshark
- git
- wget
- iproute
- psmisc
- yum-utils
- chrony
- telnet
- iptables-services
- conntrack
- gcc
state: present
- name: Install several packages in case of deleting iptables
tags: iptables
yum:
name:
- iptables
- iproute
- dhclient
- plymouth
- initscripts
- kbd
- kexec-tools
- dracut
- firewalld
- iptables-services
- mlocate
state: present
- name: Set the timezone.
tags: NTP
shell: |
timedatectl set-ntp true
timedatectl set-timezone Europe/Berlin
- name: Create networking (IP routes) file
tags: routing
ansible.builtin.template:
src: /root/DS-Lite_Test_Bed/files/AFTR-networking.txt
dest: /root/networking.sh
owner: root
mode: '755'
- name: Run networking.sh
tags: routing
shell: |
cd
./networking.sh
- name: Create ssh Brute-Force protection ip6tables rules
tags: mitigation
ansible.builtin.template:
src: /root/DS-Lite_Test_Bed/files/AFTR-SSH-Protection.txt
dest: /root/ssh-protection.sh
owner: root
mode: '755'
- name: Run ssh-protection.sh
tags: mitigation
shell: |
cd
./ssh-protection.sh
- name: Create source-port extracting script
tags: dns64perf++
ansible.builtin.template:
src: /root/DS-Lite_Test_Bed/files/src-port.txt
dest: /root/src-port
owner: root
mode: '755'
- name: Set netfilter parameters such as hashize and nf_conntrack_max
tags: netfilter
shell: |
echo "16384" > /sys/module/nf_conntrack/parameters/hashsize
echo "131072" > /proc/sys/net/netfilter/nf_conntrack_max