Skip to content

Instantly share code, notes, and snippets.

@domcleal
Forked from anonymous/gist:4208933
Created December 4, 2012 21:34
Show Gist options
  • Save domcleal/4208957 to your computer and use it in GitHub Desktop.
Save domcleal/4208957 to your computer and use it in GitHub Desktop.
class sodefaultserver {
include resolv_conf
resolv_conf{ 'resolv.conf' :
domainname=> 'abc.com',
searchpath=> 'abc.com',
nameservers => ['10.87.42.109', '10.87.42.110'],
options => ['timeout:2', 'attempts:3'],
}
# sysctl settings checks
sysctl { "net.ipv4.conf.all.rp_filter":
ensure => present,
value => "1",
}
sysctl { "net.ipv4.conf.lo.rp_filter":
ensure => present,
value => "1",
}
sysctl { "net.ipv4.conf.eth0.rp_filter":
ensure => present,
value => "1",
}
sysctl { "net.ipv4.conf.default.rp_filter":
ensure => present,
value => "1",
}
sysctl { "net.ipv4.tcp_fin_timeout":
ensure => present,
value => "15",
}
sysctl { "net.ipv4.tcp_keepalive_time":
ensure => present,
value => "300",
}
sysctl { "net.ipv4.tcp_max_orphans":
Package { ensure => "installed" }
package { "ntp": }
package { "net-snmp": }
package { "net-snmp-utils": }
package { "net-snmp-perl": }
service { "snmpd":
ensure=>"running",
}
service { "sshd":
ensure=>"running",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment