diff options
author | Jan Wagner <mail@jwagner.eu> | 2016-03-06 14:51:22 +0100 |
---|---|---|
committer | Jan Wagner <mail@jwagner.eu> | 2016-03-06 14:51:22 +0100 |
commit | 1f5000be9fe21add745d1c9a03c391ddf1321e51 (patch) | |
tree | f6f777f32f960c5dd959ab34b029e2514781cc68 /files/sysctl.d | |
parent | a03e217233d19052cc24f51e8ed4efcd78c6aafd (diff) | |
parent | 18794fc3f26e9bf9df23d5bc55a502065069ed67 (diff) | |
download | rpi2-gen-image-1f5000be9fe21add745d1c9a03c391ddf1321e51.tar.gz rpi2-gen-image-1f5000be9fe21add745d1c9a03c391ddf1321e51.tar.bz2 rpi2-gen-image-1f5000be9fe21add745d1c9a03c391ddf1321e51.zip |
Merge branch 'fpytloun-master'
Diffstat (limited to 'files/sysctl.d')
-rw-r--r-- | files/sysctl.d/81-rpi-vm.conf | 6 | ||||
-rw-r--r-- | files/sysctl.d/82-rpi-net-hardening.conf | 59 |
2 files changed, 65 insertions, 0 deletions
diff --git a/files/sysctl.d/81-rpi-vm.conf b/files/sysctl.d/81-rpi-vm.conf new file mode 100644 index 0000000..b818fc6 --- /dev/null +++ b/files/sysctl.d/81-rpi-vm.conf @@ -0,0 +1,6 @@ +# Avoid swapping and increase cache sizes +vm.swappiness=1 +vm.dirty_background_ratio=20 +vm.dirty_ratio=40 +vm.dirty_writeback_centisecs=500 +vm.dirty_expire_centisecs=6000 diff --git a/files/sysctl.d/82-rpi-net-hardening.conf b/files/sysctl.d/82-rpi-net-hardening.conf new file mode 100644 index 0000000..8ee6299 --- /dev/null +++ b/files/sysctl.d/82-rpi-net-hardening.conf @@ -0,0 +1,59 @@ +# Enable network stack hardening +net.ipv4.tcp_timestamps=0 +net.ipv4.tcp_syncookies=1 +net.ipv4.conf.all.rp_filter=1 +net.ipv4.conf.all.accept_redirects=0 +net.ipv4.conf.all.send_redirects=0 +net.ipv4.conf.all.accept_source_route=0 +net.ipv4.conf.default.rp_filter=1 +net.ipv4.conf.default.accept_redirects=0 +net.ipv4.conf.default.send_redirects=0 +net.ipv4.conf.default.accept_source_route=0 +net.ipv4.conf.lo.accept_redirects=0 +net.ipv4.conf.lo.send_redirects=0 +net.ipv4.conf.lo.accept_source_route=0 +net.ipv4.conf.eth0.accept_redirects=0 +net.ipv4.conf.eth0.send_redirects=0 +net.ipv4.conf.eth0.accept_source_route=0 +net.ipv4.icmp_echo_ignore_broadcasts=1 +net.ipv4.icmp_ignore_bogus_error_responses=1 + +net.ipv6.conf.all.accept_redirects=0 +net.ipv6.conf.all.accept_source_route=0 +net.ipv6.conf.all.router_solicitations=0 +net.ipv6.conf.all.accept_ra_rtr_pref=0 +net.ipv6.conf.all.accept_ra_pinfo=0 +net.ipv6.conf.all.accept_ra_defrtr=0 +net.ipv6.conf.all.autoconf=0 +net.ipv6.conf.all.dad_transmits=0 +net.ipv6.conf.all.max_addresses=1 + +net.ipv6.conf.default.accept_redirects=0 +net.ipv6.conf.default.accept_source_route=0 +net.ipv6.conf.default.router_solicitations=0 +net.ipv6.conf.default.accept_ra_rtr_pref=0 +net.ipv6.conf.default.accept_ra_pinfo=0 +net.ipv6.conf.default.accept_ra_defrtr=0 +net.ipv6.conf.default.autoconf=0 +net.ipv6.conf.default.dad_transmits=0 +net.ipv6.conf.default.max_addresses=1 + +net.ipv6.conf.lo.accept_redirects=0 +net.ipv6.conf.lo.accept_source_route=0 +net.ipv6.conf.lo.router_solicitations=0 +net.ipv6.conf.lo.accept_ra_rtr_pref=0 +net.ipv6.conf.lo.accept_ra_pinfo=0 +net.ipv6.conf.lo.accept_ra_defrtr=0 +net.ipv6.conf.lo.autoconf=0 +net.ipv6.conf.lo.dad_transmits=0 +net.ipv6.conf.lo.max_addresses=1 + +net.ipv6.conf.eth0.accept_redirects=0 +net.ipv6.conf.eth0.accept_source_route=0 +net.ipv6.conf.eth0.router_solicitations=0 +net.ipv6.conf.eth0.accept_ra_rtr_pref=0 +net.ipv6.conf.eth0.accept_ra_pinfo=0 +net.ipv6.conf.eth0.accept_ra_defrtr=0 +net.ipv6.conf.eth0.autoconf=0 +net.ipv6.conf.eth0.dad_transmits=0 +net.ipv6.conf.eth0.max_addresses=1 |