--- /dev/null
+#!/bin/sh
+
+
+sleep 1
+systemctl --quiet is-active NetworkManager.service
+NM_RC=$?
+WAITED=0
+while [ $NM_RC -ne 0 ]
+do
+ echo -n .
+ sleep 1
+ WAITED=1
+ systemctl --quiet is-active NetworkManager.service
+ NM_RC=$?
+done
+[ $WAITED -ne 0 ] && echo
+
+CONNECTIONS=$(nmcli connection show | grep -v '^NAME' | wc -l)
+if [ $CONNECTIONS -ne 1 ]
+then
+ echo "Number of connections: $CONNECTIONS" >&2
+ exit 1
+fi
+
+CONNECTION_LINE=$(nmcli connection show | grep -v '^NAME')
+CONNECTION_TOKENS=$(echo $CONNECTION_LINE | wc -w)
+#CONNECTION_NAME_POS=$(( $CONNECTION_TOKENS - 3 ))
+CONNECTION_UUID_POS=$(( $CONNECTION_TOKENS - 2 ))
+#CONNECTION_TYPE_POS=$(( $CONNECTION_TOKENS - 1 ))
+CONNECTION_DEVICE_POS=$CONNECTION_TOKENS
+#CONNECTION_NAME=$(echo $CONNECTION_LINE \
+# | cut -f -$CONNECTION_NAME_POS -d ' ')
+CONNECTION_UUID=$(echo $CONNECTION_LINE \
+ | cut -f $CONNECTION_UUID_POS -d ' ')
+#CONNECTION_TYPE=$(echo $CONNECTION_LINE \
+# | cut -f $CONNECTION_TYPE_POS -d ' ')
+CONNECTION_DEVICE=$(echo $CONNECTION_LINE \
+ | cut -f $CONNECTION_DEVICE_POS -d ' ')
+
+nmcli connection delete uuid "$CONNECTION_UUID"
+
+nmcli connection add \
+ type 802-3-ethernet \
+ ifname $CONNECTION_DEVICE \
+ con-name perimeter \
+ autoconnect yes \
+ save yes \
+ ipv4.addresses "192.168.173.64/24" \
+ ipv4.dns "192.168.173.174" \
+ ipv4.dns-search "pm.user.hu" \
+ ipv4.gateway "192.168.173.254" \
+ ipv4.method "manual" \
+ ipv4.routes "10.228.0.0/16 192.168.173.1" \
+ ipv6.method "ignore"
+nmcli connection show
--- /dev/null
+//
+// named.conf
+//
+
+options {
+ directory "/var/named";
+ dump-file "data/cache_dump.db";
+ statistics-file "data/named_stats.txt";
+ memstatistics-file "data/named_mem_stats.txt";
+
+ listen-on port 53 { any; };
+ listen-on-v6 port 53 { any; };
+
+ allow-query { none; };
+ allow-query-cache { none; };
+ allow-recursion { none; };
+
+ recursion no;
+
+ dnssec-enable yes;
+ dnssec-validation auto;
+
+ random-device "/dev/urandom";
+};
+
+logging {
+ channel default_debug {
+ file "data/named.run" versions 3 size 5m;
+ severity dynamic;
+ print-category yes;
+ print-severity yes;
+ print-time yes;
+ };
+ channel client_channel {
+ file "data/client.log" versions 3 size 1m;
+ severity info;
+ print-category yes;
+ print-severity yes;
+ print-time yes;
+ };
+ channel lame-servers_channel {
+ file "data/lame-servers.log" versions 3 size 1m;
+ severity info;
+ print-category yes;
+ print-severity yes;
+ print-time yes;
+ };
+ channel notify_channel {
+ file "data/notify.log" versions 3 size 1m;
+ severity info;
+ print-category yes;
+ print-severity yes;
+ print-time yes;
+ };
+ channel queries_channel {
+ file "data/queries.log" versions 3 size 5m;
+ severity info;
+ print-category yes;
+ print-severity yes;
+ print-time yes;
+ };
+ channel security_channel {
+ file "data/security.log" versions 3 size 1m;
+ severity info;
+ print-category yes;
+ print-severity yes;
+ print-time yes;
+ };
+ channel xfer-in_channel {
+ file "data/xfer-in.log" versions 3 size 1m;
+ severity info;
+ print-category yes;
+ print-severity yes;
+ print-time yes;
+ };
+ channel xfer-out_channel {
+ file "data/xfer-out.log" versions 3 size 1m;
+ severity info;
+ print-category yes;
+ print-severity yes;
+ print-time yes;
+ };
+ category default {
+ default_syslog;
+ default_debug;
+ };
+ category client {
+ client_channel;
+ };
+ category lame-servers {
+ lame-servers_channel;
+ };
+ category notify {
+ notify_channel;
+ };
+ category queries {
+ queries_channel;
+ };
+ category security {
+ security_channel;
+ };
+ category xfer-in {
+ xfer-in_channel;
+ };
+ category xfer-out {
+ xfer-out_channel;
+ };
+};
+
+key "primary_ns-external_ns" {
+ algorithm hmac-sha256;
+ secret "4ekZY173EctYMvyy9XaCAMhB5bpU7gHNTPiJ0m8ajBA=";
+};
+key "peep_bo_ns-user_ns" {
+ algorithm hmac-sha256;
+ secret "TlqKwJQhMZJ1sfS7eQxJIrGrysvhylWuvIIPLi5dQiw=";
+};
+
+acl primary_ns_key_acl { key "primary_ns-external_ns"; };
+acl peep_bo_ns_key_acl { key "peep_bo_ns-user_ns"; };
+acl invitel_nsm_ns_ip_acl { 213.163.0.156; };
+
+masters primary_ns_master { 10.228.109.174 key "primary_ns-external_ns"; };
+masters peep_bo_ns_master { 195.228.46.236 key "peep_bo_ns-user_ns"; };
+masters invitel_nsm_ns_master { 213.163.0.156; };
+
+server 10.228.109.174 { keys { "primary_ns-external_ns"; }; };
+server 195.228.46.236 { keys { "peep_bo_ns-user_ns"; }; };
+
+view "external" {
+ match-clients { ! localnets; ! localhost; any; };
+
+ allow-query { ! localnets; ! localhost; any; };
+ allow-query-cache { none; };
+ allow-recursion { none; };
+ allow-transfer { none; };
+ allow-update { none; };
+
+ notify no;
+
+ recursion no;
+
+ # external zones
+ zone "useribm.hu" IN {
+ type slave;
+ masters { primary_ns_master; };
+ file "slaves/useribm.hu.zone";
+
+ allow-transfer { invitel_nsm_ns_ip_acl; };
+ allow-notify { primary_ns_key_acl; };
+ notify explicit;
+ also-notify { invitel_nsm_ns_master; };
+ };
+ zone "userrendszerhaz.hu" IN {
+ type slave;
+ masters { primary_ns_master; };
+ file "slaves/userrendszerhaz.hu.zone";
+
+ allow-transfer { invitel_nsm_ns_ip_acl; };
+ allow-notify { primary_ns_key_acl; };
+ notify explicit;
+ also-notify { invitel_nsm_ns_master; };
+ };
+
+ # peep-bo zones
+ zone "qqcs.org" IN {
+ type slave;
+ masters { peep_bo_ns_master; };
+ file "slaves/qqcs.org.zone.signed";
+
+ allow-notify { peep_bo_ns_key_acl; };
+ };
+ zone "kukucs.org" IN {
+ type slave;
+ masters { peep_bo_ns_master; };
+ file "slaves/kukucs.org.zone.signed";
+
+ allow-notify { peep_bo_ns_key_acl; };
+ };
+};