Skip to content

Instantly share code, notes, and snippets.

@ipcrm
Last active February 14, 2018 21:01
Show Gist options
  • Save ipcrm/b0dfb02fbd17564ed09887721b719da4 to your computer and use it in GitHub Desktop.
Save ipcrm/b0dfb02fbd17564ed09887721b719da4 to your computer and use it in GitHub Desktop.
sysctl
class profile::sysctl (
String $ip_forward = '0',
String $tcp_max_syn_backlog = '1280',
String $accept_source_route = '0',
String $icmp_echo_ignore_broadcasts = '1',
String $rp_filter = '1',
String $all_secure_redirects = '0',
String $all_accept_redirects = '0',
String $default_secure_redirects = '0',
String $default_accept_redirects = '0',
String $icmp_ignore_bogus_error_responses = '1',
String $default_send_redirects = '0',
String $all_send_redirects = '0',
){
sysctl {'net.ipv4.ip_forward': value => $ip_forward }
sysctl {'net.ipv4.tcp_max_syn_backlog': value => $tcp_max_syn_backlog }
sysctl {'net.ipv4.conf.all.accept_source_route': value => $accept_source_route }
sysctl {'net.ipv4.icmp_echo_ignore_broadcasts': value => $icmp_echo_ignore_broadcasts }
sysctl {'net.ipv4.conf.all.rp_filter': value => $rp_filter }
sysctl {'net.ipv4.conf.all.secure_redirects': value => $all_secure_redirects }
sysctl {'net.ipv4.conf.all.accept_redirects': value => $all_accept_redirects }
sysctl {'net.ipv4.conf.default.secure_redirects': value => $default_secure_redirects }
sysctl {'net.ipv4.conf.default.accept_redirects': value => $default_accept_redirects }
sysctl {'net.ipv4.icmp_ignore_bogus_error_responses': value => $icmp_ignore_bogus_error_responses }
sysctl {'net.ipv4.conf.default.send_redirects': value => $default_send_redirects }
sysctl {'net.ipv4.conf.all.send_redirects': value => $all_send_redirects }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment