Manage tinc-up script

We might want to add routes globally here, so we can avoid nat elsewwhere,
Also make sure that the route to DGSM mcast is up if tinc is retarted
This commit is contained in:
Keith Whyte 2023-03-30 06:42:12 +02:00
parent 0b91b49ef8
commit 1adf3a92a3
2 changed files with 11 additions and 0 deletions

View file

@ -686,6 +686,13 @@ schedule { 'never':
content => template('rhizo_base/apcupsd.erb'),
}
file { '/etc/tinc/rhizomatica/tinc-up':
ensure => 'present',
content => template('rhizo_base/tinc-up.erb'),
owner => 'root',
mode => '750'
}
$comment = $production ? {
0 => '#',
1 => '',

View file

@ -0,0 +1,4 @@
/sbin/ifconfig $INTERFACE <%= @vpn_ip_address %> netmask 255.255.0.0
/sbin/ip route add 10.22.0.0/16 via 10.23.0.2 dev rhizomatica
/sbin/ip route add 10.60.0.0/16 via 10.23.0.2 dev rhizomatica
/sbin/ip route add 239.192.23.42 dev rhizomatica