From fa7f5a7b4e8e984d373a3730491cace097650050 Mon Sep 17 00:00:00 2001 From: kantorkel Date: Sun, 30 Aug 2015 13:52:30 +0200 Subject: [PATCH] changed config to cidr format --- group_vars/ffhh | 7 ++----- roles/ntp-server/templates/ntp.conf.j2 | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/group_vars/ffhh b/group_vars/ffhh index dc06610..10c9f5a 100644 --- a/group_vars/ffhh +++ b/group_vars/ffhh @@ -1,6 +1,3 @@ --- -prefix4: 10.112.0.0 -netmask4: 255.255.192.0 - -prefix6: 2a03:2267:0000:0000:0000:0000:0000:0000 -netmask6: ffff:ffff:ffff:ffff:0000:0000:0000:0000 +prefix4: 10.112.0.0/18 +prefix6: 2a03:2267::/64 diff --git a/roles/ntp-server/templates/ntp.conf.j2 b/roles/ntp-server/templates/ntp.conf.j2 index 3e72675..f4c065d 100644 --- a/roles/ntp-server/templates/ntp.conf.j2 +++ b/roles/ntp-server/templates/ntp.conf.j2 @@ -31,7 +31,6 @@ restrict -6 ::1 # Disable the monlist request as this is associated with ntp # amplification attacks disable monitor - -restrict {{ prefix4 }} mask {{ netmask4 }} nomodify notrap nopeer -restrict {{ prefix6 }} mask {{ netmask6 }} nomodify notrap nopeer +restrict {{ prefix4.split("/")[0] }} mask {{ prefix4 | ipaddr('netmask') }} nomodify notrap nopeer +restrict {{ prefix6.split("/")[0] }} mask {{ prefix6 | ipaddr('netmask') }} nomodify notrap nopeer