]> git.sesse.net Git - nms/commitdiff
Make a port list for MBD, and push it to Net.
authorroot <root@sysrq>
Tue, 3 Apr 2007 09:53:23 +0000 (11:53 +0200)
committerroot <root@sysrq>
Tue, 3 Apr 2007 09:53:23 +0000 (11:53 +0200)
make-all-config.sh
mbd/generate-helper-list.pl [new file with mode: 0755]

index b2bff4fa7377bfda44a3f6c8a7695b7866a735fc..5a8c893f8809469f915e8ccab04bbc5e3a5a950a 100755 (executable)
@@ -5,3 +5,5 @@ cat static-switches.txt >> switches.txt
 ./config/make-named.pl > /etc/bind/named.conf
 ./config/make-named-secondary.pl | ssh root@insert 'cat > /etc/bind/named.conf'
 ./config/make-missing-zones.pl
+(cd mbd && ./generate-helper-list.pl > ../mbd-ports)
+scp mbd-ports sesse@f1:/tftpboot/portcfg/
diff --git a/mbd/generate-helper-list.pl b/mbd/generate-helper-list.pl
new file mode 100755 (executable)
index 0000000..fd89475
--- /dev/null
@@ -0,0 +1,15 @@
+#! /usr/bin/perl
+use strict;
+use warnings;
+require './access_list.pl';
+require './nets.pl';
+require './mbd.pm';
+
+my @ports = mbd::find_all_ports();
+
+print "no ip forward-protocol udp 137\n";
+print "no ip forward-protocol udp 138\n";
+
+for my $port (@ports) {
+       print "ip forward-protocol udp $port\n";
+}