Add some configurable support for ipv6
This commit is contained in:
parent
60432f69b1
commit
bc340b8a99
3 changed files with 54 additions and 2 deletions
|
@ -70,6 +70,8 @@ class rhizo_base {
|
|||
$jb_bts = hiera('rhizo::jb_bts', '100')
|
||||
|
||||
# IP address
|
||||
$has_ip6 = hiera('rhizo::has_ip6', '')
|
||||
$ip6_trusted = hiera('rhizo::ip6_trusted', '::1/128')
|
||||
$mncc_ip_address = hiera('rhizo::mncc_ip_address', '172.16.0.1')
|
||||
$bsc_ip_address = hiera('rhizo::bsc_ip_address', '172.16.0.1')
|
||||
$vpn_ip_address = hiera('rhizo::vpn_ip_address')
|
||||
|
@ -737,4 +739,27 @@ schedule { 'never':
|
|||
type => 'ssh-rsa',
|
||||
}
|
||||
|
||||
if $has_ip6 == "1" {
|
||||
file { '/etc/network/ip6t-default':
|
||||
ensure => 'present',
|
||||
content => template('rhizo_base/ip6tables.erb'),
|
||||
notify => Exec['ip6t-reset'],
|
||||
}
|
||||
file { '/etc/sysctl.d/10-ipv6.conf':
|
||||
ensure => 'absent'
|
||||
}
|
||||
exec { 'ip6-activate':
|
||||
command => '/usr/sbin/sysctl net.ipv6.conf.all.disable_ipv6=0'
|
||||
}
|
||||
} else {
|
||||
file { '/etc/sysctl.d/10-ipv6.conf':
|
||||
content => "net.ipv6.conf.all.disable_ipv6=1\n"
|
||||
}
|
||||
}
|
||||
|
||||
exec { 'ip6t-reset':
|
||||
refreshonly => true,
|
||||
command => '/sbin/ip6tables-restore < /etc/network/ip6t-default'
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue