From 189b3763818fe5792cf06ead5f96f13be4080ed9 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Fri, 11 Oct 2019 22:30:22 -0400 Subject: new target: make install-bootserver --- conf/br0.in | 12 ++++++++++++ conf/dnsmasq.conf | 22 ---------------------- conf/dnsmasq.conf.in | 22 ++++++++++++++++++++++ conf/eth0 | 3 +++ conf/interfaces.d_eth0 | 19 ------------------- conf/network_if-up.d_samizdat | 5 ----- conf/network_if-up.d_samizdat.in | 5 +++++ 7 files changed, 42 insertions(+), 46 deletions(-) create mode 100644 conf/br0.in delete mode 100644 conf/dnsmasq.conf create mode 100644 conf/dnsmasq.conf.in create mode 100644 conf/eth0 delete mode 100644 conf/interfaces.d_eth0 delete mode 100755 conf/network_if-up.d_samizdat create mode 100755 conf/network_if-up.d_samizdat.in (limited to 'conf') diff --git a/conf/br0.in b/conf/br0.in new file mode 100644 index 0000000..9d5c17b --- /dev/null +++ b/conf/br0.in @@ -0,0 +1,12 @@ +auto br0 + +iface br0 inet static +# pre-up echo 0 > /proc/sys/net/ipv6/conf/br0/accept_ra_pinfo # disable ipv6 auto-address + pre-up for n in 0 1 2 3 4; do tunctl -t tap$n; done; true + pre-down for n in 0 1 2 3 4; do tunctl -d tap$n; done; true + address 192.168.10.1 + netmask 255.255.255.0 + bridge_ports tap0 tap1 tap2 tap3 tap4 + bridge_maxwait 10 + up iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE + up sysctl -w net.ipv4.ip_forward=1 diff --git a/conf/dnsmasq.conf b/conf/dnsmasq.conf deleted file mode 100644 index 5ab9008..0000000 --- a/conf/dnsmasq.conf +++ /dev/null @@ -1,22 +0,0 @@ -interface=br0 -domain=localdomain -dhcp-range=192.168.10.10,192.168.10.253,255.255.255.0,1h -enable-tftp - -dhcp-host=52:54:00:12:34:56,samizdoot-vm,192.168.10.82 -dhcp-host=52:54:00:12:34:57,samizdote-vm,192.168.10.83 -dhcp-host=52:54:00:12:34:58,samizdeet-vm,192.168.10.84 -dhcp-host=52:54:00:12:34:59,samizdite-vm,192.168.10.85 -dhcp-host=52:54:00:12:34:5A,samizdate-vm,192.168.10.86 - -#dhcp-host=f0:de:f1:5a:ac:e8,samizdoot-irl,192.168.10.82 - -pxe-service=x86PC, "Samizdat", pxelinux -dhcp-boot=pxelinux.0 -tftp-root=/usr/local/lib/samizdat-rhizome/isolinux - -# dhcp-boot=/boot/grub/i386-pc/core.0 -# tftp-root=/srv/tftp - -tftp-unique-root -dhcp-script=/usr/local/bin/dnsmasq-dhcp-script.sh diff --git a/conf/dnsmasq.conf.in b/conf/dnsmasq.conf.in new file mode 100644 index 0000000..5ab9008 --- /dev/null +++ b/conf/dnsmasq.conf.in @@ -0,0 +1,22 @@ +interface=br0 +domain=localdomain +dhcp-range=192.168.10.10,192.168.10.253,255.255.255.0,1h +enable-tftp + +dhcp-host=52:54:00:12:34:56,samizdoot-vm,192.168.10.82 +dhcp-host=52:54:00:12:34:57,samizdote-vm,192.168.10.83 +dhcp-host=52:54:00:12:34:58,samizdeet-vm,192.168.10.84 +dhcp-host=52:54:00:12:34:59,samizdite-vm,192.168.10.85 +dhcp-host=52:54:00:12:34:5A,samizdate-vm,192.168.10.86 + +#dhcp-host=f0:de:f1:5a:ac:e8,samizdoot-irl,192.168.10.82 + +pxe-service=x86PC, "Samizdat", pxelinux +dhcp-boot=pxelinux.0 +tftp-root=/usr/local/lib/samizdat-rhizome/isolinux + +# dhcp-boot=/boot/grub/i386-pc/core.0 +# tftp-root=/srv/tftp + +tftp-unique-root +dhcp-script=/usr/local/bin/dnsmasq-dhcp-script.sh diff --git a/conf/eth0 b/conf/eth0 new file mode 100644 index 0000000..364b0a2 --- /dev/null +++ b/conf/eth0 @@ -0,0 +1,3 @@ +auto eth0 + +iface eth0 inet dhcp diff --git a/conf/interfaces.d_eth0 b/conf/interfaces.d_eth0 deleted file mode 100644 index 3dbf9b4..0000000 --- a/conf/interfaces.d_eth0 +++ /dev/null @@ -1,19 +0,0 @@ -# iface eth0 inet static -# address 192.168.10.1 -# netmask 255.255.255.0 -# # post-up ipsec restart - -auto br0 eth0 - -iface br0 inet static -# pre-up echo 0 > /proc/sys/net/ipv6/conf/br0/accept_ra_pinfo # disable ipv6 auto-address - pre-up for n in 0 1 2 3 4; do tunctl -t tap$n; done; true - pre-down for n in 0 1 2 3 4; do tunctl -d tap$n; done; true - address 192.168.10.1 - netmask 255.255.255.0 - bridge_ports eth0 tap0 tap1 tap2 tap3 tap4 - bridge_maxwait 10 - up iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE - up sysctl -w net.ipv4.ip_forward=1 - -iface eth0 inet manual diff --git a/conf/network_if-up.d_samizdat b/conf/network_if-up.d_samizdat deleted file mode 100755 index 4c02c93..0000000 --- a/conf/network_if-up.d_samizdat +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -RULE='OUTPUT -p tcp -d 10.192.0.0/10 -j REDIRECT --to-ports 9040' -iptables -t nat -D $RULE 2>/dev/null -[ "$VERBOSITY" -gt 0 ] && set -x -iptables -t nat -A $RULE diff --git a/conf/network_if-up.d_samizdat.in b/conf/network_if-up.d_samizdat.in new file mode 100755 index 0000000..4c02c93 --- /dev/null +++ b/conf/network_if-up.d_samizdat.in @@ -0,0 +1,5 @@ +#!/bin/sh +RULE='OUTPUT -p tcp -d 10.192.0.0/10 -j REDIRECT --to-ports 9040' +iptables -t nat -D $RULE 2>/dev/null +[ "$VERBOSITY" -gt 0 ] && set -x +iptables -t nat -A $RULE -- cgit v1.2.3