You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+59-8Lines changed: 59 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,8 +31,6 @@ It will not:
31
31
32
32
## Variables
33
33
34
-
### in main.yml
35
-
36
34
*`os_desktop_enable: false` - true if this is a desktop system, ie Xorg, KDE/GNOME/Unity/etc
37
35
*`os_env_extra_user_paths: []` - add additional paths to the user's `PATH` variable (default is empty).
38
36
*`os_env_umask: "027"`
@@ -54,12 +52,6 @@ It will not:
54
52
*`os_security_suid_sgid_remove_from_unknown: false` - true if you want to remove SUID/SGID bits from any file, that is not explicitly configured in a `blacklist`. This will make every Ansible-run search through the mounted filesystems looking for SUID/SGID bits that are not configured in the default and user blacklist. If it finds an SUID/SGID bit, it will be removed, unless this file is in your `whitelist`.
55
53
*`os_security_packages_clean': true` - removes packages with known issues. See section packages.
56
54
57
-
### in sysctl.yml
58
-
59
-
*`os_network_forwarding: false` - true if this system requires packet forwarding (eg Router), false otherwise
60
-
*`os_network_ipv6_enable: false`
61
-
*`os_network_arp_restricted: true` - true if you want the behavior of announcing and replying to ARP to be restricted, false otherwise
62
-
63
55
## Packages
64
56
65
57
We remove the following packages:
@@ -77,6 +69,65 @@ We remove the following packages:
77
69
roles:
78
70
- hardening.os-hardening
79
71
72
+
73
+
## Changing sysctl variables
74
+
75
+
If you want to overwrite sysctl-variables, you have to overwrite the *whole* dict, or else only the single overwritten will be actually used.
76
+
So for example if you want to change the IPv4 traffic forwarding variable to `1`, you must pass the whole dict like this:
# Make sure to ignore ECHO broadcasts, which are only required in broad network analysis.
100
+
net.ipv4.icmp_echo_ignore_broadcasts: 1
101
+
102
+
# There is no reason to accept bogus error responses from ICMP, so ignore them instead.
103
+
net.ipv4.icmp_ignore_bogus_error_responses: 1
104
+
105
+
# Limit the amount of traffic the system uses for ICMP.
106
+
net.ipv4.icmp_ratelimit: 100
107
+
108
+
# Adjust the ICMP ratelimit to include ping, dst unreachable,
109
+
# source quench, ime exceed, param problem, timestamp reply, information reply
110
+
net.ipv4.icmp_ratemask: 88089
111
+
112
+
# Disable IPv6
113
+
net.ipv6.conf.all.disable_ipv6: 1
114
+
115
+
# Protect against wrapping sequence numbers at gigabit speeds
116
+
net.ipv4.tcp_timestamps: 0
117
+
118
+
# Define restriction level for announcing the local source IP
119
+
net.ipv4.conf.all.arp_ignore: 1
120
+
121
+
# Define mode for sending replies in response to
122
+
# received ARP requests that resolve local target IP addresses
123
+
net.ipv4.conf.all.arp_announce: 2
124
+
125
+
# RFC 1337 fix F1
126
+
net.ipv4.tcp_rfc1337: 1
127
+
```
128
+
129
+
Alternatively you can change Ansible's [hash-behaviour](https://docs.ansible.com/ansible/intro_configuration.html#hash-behaviour) to `merge`, then you only have to overwrite the single hash you need to. But please be aware that changing the hash-behaviour changes it for all your playbooks and is not recommended by Ansible.
130
+
80
131
## Local Testing
81
132
82
133
For local testing you can use vagrant and Virtualbox of VMWare to run tests locally. You will have to install Virtualbox and Vagrant on your system. See [Vagrant Downloads](http://downloads.vagrantup.com/) for a vagrant package suitable for your system. For all our tests we use `test-kitchen`. If you are not familiar with `test-kitchen` please have a look at [their guide](http://kitchen.ci/docs/getting-started).
0 commit comments