Add config for ipip interface

Supplying an empty .network file is weird but without it the tunl0
interface is left in a DOWN state even with Independent=true.

Maybe this is related to "tunl0" being automatically created when the
"ipip" kernel module is loaded.
This commit is contained in:
Patrik Lundin 2024-10-11 22:05:11 +02:00
parent cb50714f4f
commit d289ffa656
Signed by: patlu
GPG key ID: A0A812BA2249F294
3 changed files with 31 additions and 0 deletions

View file

@ -60,6 +60,27 @@ class cdn::cache(
refreshonly => true, refreshonly => true,
} }
file { '/etc/systemd/network/10-cdn-ipip.netdev':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
content => template('cdn/cache/10-cdn-ipip.netdev.erb'),
}
file { '/etc/systemd/network/10-cdn-ipip.network':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
content => template('cdn/cache/10-cdn-ipip.network.erb'),
}
# Reload the network config if it has changed
exec { 'networkctl reload':
subscribe => File['/etc/systemd/network/10-cdn-ipip.network'],
refreshonly => true,
}
$sysctl_file = '/etc/sysctl.d/99-cdn-cache.conf' $sysctl_file = '/etc/sysctl.d/99-cdn-cache.conf'
file { $sysctl_file: file { $sysctl_file:
ensure => file, ensure => file,

View file

@ -0,0 +1,8 @@
[NetDev]
Name=tunl0
Kind=ipip
[Tunnel]
Independent=true
Local=0.0.0.0
Remote=0.0.0.0

View file

@ -0,0 +1,2 @@
[Match]
Name=tunl0