import from old webserver
This commit is contained in:
commit
ef633b2cf4
65 changed files with 69233 additions and 0 deletions
51
noc/configs/dhcp3/dhcpd.conf
Normal file
51
noc/configs/dhcp3/dhcpd.conf
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
#
|
||||
#
|
||||
#ddns-update-style none;
|
||||
ddns-update-style interim;
|
||||
ddns-domainname "easterhegg.de";
|
||||
authoritative;
|
||||
|
||||
# option definitions common to all supported networks...
|
||||
option domain-name "easterhegg.de";
|
||||
option domain-name-servers 172.16.0.1;
|
||||
min-lease-time 3600;
|
||||
default-lease-time 7200;
|
||||
max-lease-time 14400;
|
||||
ping-check true;
|
||||
update-optimization false;
|
||||
|
||||
#subnet 204.254.239.0 netmask 255.255.255.224 {
|
||||
# range 204.254.239.10 204.254.239.20;
|
||||
# option broadcast-address 204.254.239.31;
|
||||
# option routers prelude.fugue.com;
|
||||
#}
|
||||
|
||||
# Kabel
|
||||
subnet 172.16.0.0 netmask 255.255.252.0 {
|
||||
range 172.16.2.2 172.16.2.254;
|
||||
range 172.16.3.2 172.16.3.254;
|
||||
option broadcast-address 172.16.3.255;
|
||||
option routers 172.16.0.1;
|
||||
}
|
||||
|
||||
# WLAN
|
||||
subnet 172.16.4.0 netmask 255.255.252.0 {
|
||||
range 172.16.6.2 172.16.6.254;
|
||||
range 172.16.7.2 172.16.7.254;
|
||||
option broadcast-address 172.16.7.255;
|
||||
option routers 172.16.4.1;
|
||||
}
|
||||
|
||||
# NOC
|
||||
subnet 172.16.42.0 netmask 255.255.255.0 {
|
||||
range 172.16.42.128 172.16.42.254;
|
||||
option broadcast-address 172.16.42.255;
|
||||
option routers 172.16.42.1;
|
||||
}
|
||||
|
||||
# AFU-Druck
|
||||
subnet 172.16.25.0 netmask 255.255.255.0 {
|
||||
range 172.16.25.2 172.16.25.199;
|
||||
option broadcast-address 172.16.25.255;
|
||||
option routers 172.16.25.1;
|
||||
}
|
||||
108
noc/configs/dhcp3/dhcpd.conf.dpkg-dist
Normal file
108
noc/configs/dhcp3/dhcpd.conf.dpkg-dist
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
#
|
||||
# Sample configuration file for ISC dhcpd for Debian
|
||||
#
|
||||
# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
|
||||
#
|
||||
|
||||
# The ddns-updates-style parameter controls whether or not the server will
|
||||
# attempt to do a DNS update when a lease is confirmed. We default to the
|
||||
# behavior of the version 2 packages ('none', since DHCP v2 didn't
|
||||
# have support for DDNS.)
|
||||
ddns-update-style none;
|
||||
|
||||
# option definitions common to all supported networks...
|
||||
option domain-name "example.org";
|
||||
option domain-name-servers ns1.example.org, ns2.example.org;
|
||||
|
||||
default-lease-time 600;
|
||||
max-lease-time 7200;
|
||||
|
||||
# If this DHCP server is the official DHCP server for the local
|
||||
# network, the authoritative directive should be uncommented.
|
||||
#authoritative;
|
||||
|
||||
# Use this to send dhcp log messages to a different log file (you also
|
||||
# have to hack syslog.conf to complete the redirection).
|
||||
log-facility local7;
|
||||
|
||||
# No service will be given on this subnet, but declaring it helps the
|
||||
# DHCP server to understand the network topology.
|
||||
|
||||
#subnet 10.152.187.0 netmask 255.255.255.0 {
|
||||
#}
|
||||
|
||||
# This is a very basic subnet declaration.
|
||||
|
||||
#subnet 10.254.239.0 netmask 255.255.255.224 {
|
||||
# range 10.254.239.10 10.254.239.20;
|
||||
# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
|
||||
#}
|
||||
|
||||
# This declaration allows BOOTP clients to get dynamic addresses,
|
||||
# which we don't really recommend.
|
||||
|
||||
#subnet 10.254.239.32 netmask 255.255.255.224 {
|
||||
# range dynamic-bootp 10.254.239.40 10.254.239.60;
|
||||
# option broadcast-address 10.254.239.31;
|
||||
# option routers rtr-239-32-1.example.org;
|
||||
#}
|
||||
|
||||
# A slightly different configuration for an internal subnet.
|
||||
#subnet 10.5.5.0 netmask 255.255.255.224 {
|
||||
# range 10.5.5.26 10.5.5.30;
|
||||
# option domain-name-servers ns1.internal.example.org;
|
||||
# option domain-name "internal.example.org";
|
||||
# option routers 10.5.5.1;
|
||||
# option broadcast-address 10.5.5.31;
|
||||
# default-lease-time 600;
|
||||
# max-lease-time 7200;
|
||||
#}
|
||||
|
||||
# Hosts which require special configuration options can be listed in
|
||||
# host statements. If no address is specified, the address will be
|
||||
# allocated dynamically (if possible), but the host-specific information
|
||||
# will still come from the host declaration.
|
||||
|
||||
#host passacaglia {
|
||||
# hardware ethernet 0:0:c0:5d:bd:95;
|
||||
# filename "vmunix.passacaglia";
|
||||
# server-name "toccata.fugue.com";
|
||||
#}
|
||||
|
||||
# Fixed IP addresses can also be specified for hosts. These addresses
|
||||
# should not also be listed as being available for dynamic assignment.
|
||||
# Hosts for which fixed IP addresses have been specified can boot using
|
||||
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
|
||||
# be booted with DHCP, unless there is an address range on the subnet
|
||||
# to which a BOOTP client is connected which has the dynamic-bootp flag
|
||||
# set.
|
||||
#host fantasia {
|
||||
# hardware ethernet 08:00:07:26:c0:a5;
|
||||
# fixed-address fantasia.fugue.com;
|
||||
#}
|
||||
|
||||
# You can declare a class of clients and then do address allocation
|
||||
# based on that. The example below shows a case where all clients
|
||||
# in a certain class get addresses on the 10.17.224/24 subnet, and all
|
||||
# other clients get addresses on the 10.0.29/24 subnet.
|
||||
|
||||
#class "foo" {
|
||||
# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
|
||||
#}
|
||||
|
||||
#shared-network 224-29 {
|
||||
# subnet 10.17.224.0 netmask 255.255.255.0 {
|
||||
# option routers rtr-224.example.org;
|
||||
# }
|
||||
# subnet 10.0.29.0 netmask 255.255.255.0 {
|
||||
# option routers rtr-29.example.org;
|
||||
# }
|
||||
# pool {
|
||||
# allow members of "foo";
|
||||
# range 10.17.224.10 10.17.224.250;
|
||||
# }
|
||||
# pool {
|
||||
# deny members of "foo";
|
||||
# range 10.0.29.10 10.0.29.230;
|
||||
# }
|
||||
#}
|
||||
45
noc/configs/group
Normal file
45
noc/configs/group
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
root:x:0:
|
||||
daemon:x:1:
|
||||
bin:x:2:
|
||||
sys:x:3:
|
||||
adm:x:4:
|
||||
tty:x:5:
|
||||
disk:x:6:
|
||||
lp:x:7:lp
|
||||
mail:x:8:
|
||||
news:x:9:
|
||||
uucp:x:10:
|
||||
proxy:x:13:
|
||||
kmem:x:15:
|
||||
dialout:x:20:
|
||||
fax:x:21:
|
||||
voice:x:22:
|
||||
cdrom:x:24:
|
||||
floppy:x:25:
|
||||
tape:x:26:
|
||||
sudo:x:27:
|
||||
audio:x:29:
|
||||
dip:x:30:
|
||||
postgres:x:32:
|
||||
www-data:x:33:
|
||||
backup:x:34:
|
||||
operator:x:37:
|
||||
list:x:38:
|
||||
irc:x:39:
|
||||
src:x:40:
|
||||
gnats:x:41:
|
||||
shadow:x:42:
|
||||
utmp:x:43:
|
||||
video:x:44:
|
||||
staff:x:50:
|
||||
games:x:60:
|
||||
users:x:100:
|
||||
nogroup:x:65534:
|
||||
man:*:12:
|
||||
sasl:*:45:
|
||||
plugdev:*:46:
|
||||
crontab:x:101:
|
||||
ssh:x:102:
|
||||
noc:x:1000:
|
||||
bind:x:1001:
|
||||
ntp:x:103:
|
||||
50
noc/configs/init.d/bind
Executable file
50
noc/configs/init.d/bind
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
#!/bin/sh
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
|
||||
test -x /usr/sbin/named || exit 0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting domain name service: named"
|
||||
ulimit -n 16384
|
||||
#/usr/sbin/named -4 -t /var/named -u bind
|
||||
/usr/sbin/named -t /var/named -u bind -n 1 -c /etc/namedb/named.conf
|
||||
#/usr/sbin/named -t /var/named -u bind -n 1 -c /etc/namedb/named.conf.bind9.2
|
||||
#/usr/sbin/named -4 -t /var/named -u bind -c /etc/namedb/named.conf.1
|
||||
#/usr/sbin/named -4 -t /var/named -u bind -c /etc/namedb/named.conf.2
|
||||
echo "."
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo -n "Stopping domain name service: named"
|
||||
/usr/bin/killall named
|
||||
echo "."
|
||||
;;
|
||||
|
||||
restart)
|
||||
/usr/bin/killall named
|
||||
sleep 2
|
||||
ulimit -n 16384
|
||||
#/usr/sbin/named -4 -t /var/named -u bind -c /etc/namedb/named.conf.1
|
||||
#/usr/sbin/named -4 -t /var/named -u bind -c /etc/namedb/named.conf.2
|
||||
#/usr/sbin/named -t /var/named -u bind -n 2 -n 2
|
||||
/usr/sbin/named -t /var/named -u bind -n 1 -c /etc/namedb/named.conf
|
||||
#/usr/sbin/named -t /var/named -u bind -n 1 -c /etc/namedb/named.conf.bind9.2
|
||||
;;
|
||||
|
||||
reload)
|
||||
/usr/bin/killall -HUP named
|
||||
;;
|
||||
|
||||
force-reload)
|
||||
$0 restart
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: /etc/init.d/bind {start|stop|reload|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
67
noc/configs/init.d/inetd
Executable file
67
noc/configs/init.d/inetd
Executable file
|
|
@ -0,0 +1,67 @@
|
|||
#!/bin/sh
|
||||
exit 0
|
||||
|
||||
#
|
||||
# start/stop inetd super server.
|
||||
|
||||
if ! [ -x /usr/sbin/inetd ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
checkportmap () {
|
||||
if grep -v "^ *#" /etc/inetd.conf | grep 'rpc/' >/dev/null; then
|
||||
if ! [ -x /usr/bin/rpcinfo ]
|
||||
then
|
||||
echo
|
||||
echo "WARNING: rpcinfo not available - RPC services may be unavailable!"
|
||||
echo " (Commenting out the rpc services in inetd.conf will"
|
||||
echo " disable this message)"
|
||||
echo
|
||||
elif ! /usr/bin/rpcinfo -u localhost portmapper >/dev/null 2>/dev/null
|
||||
then
|
||||
echo
|
||||
echo "WARNING: portmapper inactive - RPC services unavailable!"
|
||||
echo " (Commenting out the rpc services in inetd.conf will"
|
||||
echo " disable this message)"
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
checkportmap
|
||||
echo -n "Starting internet superserver:"
|
||||
echo -n " inetd" ; start-stop-daemon --start --quiet --pidfile /var/run/inetd.pid --exec /usr/sbin/inetd
|
||||
echo "."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping internet superserver:"
|
||||
echo -n " inetd" ; start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/inetd.pid --exec /usr/sbin/inetd
|
||||
echo "."
|
||||
;;
|
||||
reload)
|
||||
echo -n "Reloading internet superserver:"
|
||||
echo -n " inetd"
|
||||
start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/inetd.pid --signal 1
|
||||
echo "."
|
||||
;;
|
||||
force-reload)
|
||||
$0 reload
|
||||
;;
|
||||
restart)
|
||||
echo -n "Restarting internet superserver:"
|
||||
echo -n " inetd"
|
||||
start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/inetd.pid
|
||||
checkportmap
|
||||
start-stop-daemon --start --quiet --pidfile /var/run/inetd.pid --exec /usr/sbin/inetd
|
||||
echo "."
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/inetd {start|stop|reload|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
92
noc/configs/init.d/olsr
Executable file
92
noc/configs/init.d/olsr
Executable file
|
|
@ -0,0 +1,92 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
# skeleton Example initscript
|
||||
# This file should be used to construct scripts to be
|
||||
# placed in /etc/init.d.
|
||||
#
|
||||
# Author: Miquel van Smoorenburg <miquels@cistron.nl>.
|
||||
# Ian Murdock <imurdock@gnu.ai.mit.edu>.
|
||||
#
|
||||
# Please remove the "Author" lines above and replace them
|
||||
# with your own name if you copy and modify this script.
|
||||
#
|
||||
# Version: @(#)skeleton 2.85-23 28-Jul-2004 miquels@cistron.nl
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DESC="freifunk olsr"
|
||||
NAME=""
|
||||
|
||||
# Read config file if it is present.
|
||||
#if [ -r /etc/default/$NAME ]
|
||||
#then
|
||||
# . /etc/default/$NAME
|
||||
#fi
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service.
|
||||
#
|
||||
d_start() {
|
||||
screen -d -m -S olsr /usr/sbin/olsrd
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service.
|
||||
#
|
||||
d_stop() {
|
||||
killall olsrd
|
||||
}
|
||||
|
||||
#
|
||||
# Function that sends a SIGHUP to the daemon/service.
|
||||
#
|
||||
d_reload() {
|
||||
echo "no reload"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $DESC: $NAME"
|
||||
d_start
|
||||
echo "."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $DESC: $NAME"
|
||||
d_stop
|
||||
echo "."
|
||||
;;
|
||||
#reload)
|
||||
#
|
||||
# If the daemon can reload its configuration without
|
||||
# restarting (for example, when it is sent a SIGHUP),
|
||||
# then implement that here.
|
||||
#
|
||||
# If the daemon responds to changes in its config file
|
||||
# directly anyway, make this an "exit 0".
|
||||
#
|
||||
# echo -n "Reloading $DESC configuration..."
|
||||
# d_reload
|
||||
# echo "done."
|
||||
#;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented, move the "force-reload"
|
||||
# option to the "reload" entry above. If not, "force-reload" is
|
||||
# just the same as "restart".
|
||||
#
|
||||
echo -n "Restarting $DESC: $NAME"
|
||||
d_stop
|
||||
sleep 1
|
||||
d_start
|
||||
echo "."
|
||||
;;
|
||||
*)
|
||||
# echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
10
noc/configs/init.d/pppd-dns
Executable file
10
noc/configs/init.d/pppd-dns
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh -e
|
||||
exit 0
|
||||
|
||||
#
|
||||
# Restore /etc/resolv.conf if the system crashed before the ppp link
|
||||
# was shut down.
|
||||
|
||||
[ -x /etc/ppp/ip-down.d/0000usepeerdns ] \
|
||||
&& exec /etc/ppp/ip-down.d/0000usepeerdns
|
||||
|
||||
159
noc/configs/init.d/wshaper
Executable file
159
noc/configs/init.d/wshaper
Executable file
|
|
@ -0,0 +1,159 @@
|
|||
#!/bin/bash
|
||||
# Wonderous Shaper
|
||||
# please read the README before filling out these values
|
||||
#
|
||||
# Set the following values to somewhat less than your actual download
|
||||
# and uplink speed. In kilobits. Also set the device that is to be shaped.
|
||||
|
||||
DOWNLINK=5000
|
||||
UPLINK=490
|
||||
DEV=ppp0
|
||||
|
||||
# low priority OUTGOING traffic - you can leave this blank if you want
|
||||
# low priority source netmasks
|
||||
NOPRIOHOSTSRC=
|
||||
|
||||
# low priority destination netmasks
|
||||
NOPRIOHOSTDST=
|
||||
|
||||
# low priority source ports
|
||||
NOPRIOPORTSRC="80 20 21 4662 4666 4772 4776 2142 4005 6881 6882 6883 6884 6885 6886 6887 6888 6889"
|
||||
|
||||
# low priority destination ports
|
||||
NOPRIOPORTDST="4662 4666 4772 4776 2142 6881 6882 6883 6884 6885 6886 6887 6888 6889"
|
||||
|
||||
|
||||
my_tc() {
|
||||
/sbin/tc "$@" || echo "failed: tc $@"
|
||||
}
|
||||
|
||||
# Now remove the following two lines :-)
|
||||
|
||||
#echo Please read the documentation in 'README' first
|
||||
#exit
|
||||
|
||||
if [ "$1" = "status" ]
|
||||
then
|
||||
my_tc -s qdisc ls dev $DEV
|
||||
my_tc -s class ls dev $DEV
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
# clean existing down- and uplink qdiscs, hide errors
|
||||
my_tc qdisc del dev $DEV root 2> /dev/null > /dev/null
|
||||
my_tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null
|
||||
|
||||
if [ "$1" = "stop" ]
|
||||
then
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
###### uplink
|
||||
|
||||
# install root HTB, point default traffic to 1:20:
|
||||
|
||||
my_tc qdisc add dev $DEV root handle 1: htb default 20 r2q 1
|
||||
|
||||
# shape everything at $UPLINK speed - this prevents huge queues in your
|
||||
# DSL modem which destroy latency:
|
||||
|
||||
my_tc class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit burst 2k
|
||||
|
||||
# high prio class 1:10:
|
||||
|
||||
my_tc class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK}kbit \
|
||||
burst 2k prio 1
|
||||
|
||||
# bulk & default class 1:20 - gets slightly less traffic,
|
||||
# and a lower priority:
|
||||
|
||||
my_tc class add dev $DEV parent 1:1 classid 1:20 htb rate $[5*$UPLINK/10]kbit \
|
||||
ceil $[9*$UPLINK/10]kbit \
|
||||
burst 2k prio 2
|
||||
|
||||
my_tc class add dev $DEV parent 1:1 classid 1:30 htb rate $[1*$UPLINK/10]kbit \
|
||||
ceil $[7*$UPLINK/10]kbit \
|
||||
burst 2k prio 5
|
||||
|
||||
# all get Stochastic Fairness:
|
||||
my_tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10
|
||||
my_tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10
|
||||
my_tc qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10
|
||||
|
||||
# TOS Minimum Delay (ssh, NOT scp) in 1:10:
|
||||
|
||||
my_tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \
|
||||
match ip tos 0x10 0xff flowid 1:10
|
||||
|
||||
# ICMP (ip protocol 1) in the interactive class 1:10 so we
|
||||
# can do measurements & impress our friends:
|
||||
my_tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \
|
||||
match ip protocol 1 0xff flowid 1:10
|
||||
|
||||
# To speed up downloads while an upload is going on, put ACK packets in
|
||||
# the interactive class:
|
||||
|
||||
my_tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
|
||||
match ip protocol 6 0xff \
|
||||
match u8 0x05 0x0f at 0 \
|
||||
match u16 0x0000 0xffc0 at 2 \
|
||||
match u8 0x10 0xff at 33 \
|
||||
flowid 1:10
|
||||
|
||||
# our tunnel to mms is "interactive"
|
||||
my_tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
|
||||
match ip dst 193.103.161.61/32 flowid 1:10
|
||||
my_tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
|
||||
match ip dst 194.97.108.53/32 flowid 1:10
|
||||
|
||||
# rest is 'non-interactive' ie 'bulk' and ends up in 1:20
|
||||
|
||||
# some traffic however suffers a worse fate
|
||||
for a in $NOPRIOPORTDST
|
||||
do
|
||||
my_tc filter add dev $DEV parent 1: protocol ip prio 14 u32 \
|
||||
match ip dport $a 0xffff flowid 1:30
|
||||
done
|
||||
|
||||
for a in $NOPRIOPORTSRC
|
||||
do
|
||||
my_tc filter add dev $DEV parent 1: protocol ip prio 15 u32 \
|
||||
match ip sport $a 0xffff flowid 1:30
|
||||
done
|
||||
|
||||
for a in $NOPRIOHOSTSRC
|
||||
do
|
||||
my_tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \
|
||||
match ip src $a flowid 1:30
|
||||
done
|
||||
|
||||
for a in $NOPRIOHOSTDST
|
||||
do
|
||||
my_tc filter add dev $DEV parent 1: protocol ip prio 17 u32 \
|
||||
match ip dst $a flowid 1:30
|
||||
done
|
||||
|
||||
# rest is 'non-interactive' ie 'bulk' and ends up in 1:20
|
||||
|
||||
my_tc filter add dev $DEV parent 1: protocol ip prio 18 u32 \
|
||||
match ip dst 0.0.0.0/0 flowid 1:20
|
||||
|
||||
|
||||
########## downlink #############
|
||||
# slow downloads down to somewhat less than the real speed to prevent
|
||||
# queuing at our ISP. Tune to see how high you can set it.
|
||||
# ISPs tend to have *huge* queues to make sure big downloads are fast
|
||||
#
|
||||
# attach ingress policer:
|
||||
|
||||
my_tc qdisc add dev $DEV handle ffff: ingress
|
||||
|
||||
# filter *everything* to it (0.0.0.0/0), drop everything that's
|
||||
# coming in too fast:
|
||||
|
||||
my_tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \
|
||||
0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1
|
||||
|
||||
|
||||
70
noc/configs/inittab
Normal file
70
noc/configs/inittab
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
# /etc/inittab: init(8) configuration.
|
||||
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
|
||||
|
||||
# The default runlevel.
|
||||
id:2:initdefault:
|
||||
|
||||
# Boot-time system configuration/initialization script.
|
||||
# This is run first except when booting in emergency (-b) mode.
|
||||
si::sysinit:/etc/init.d/rcS
|
||||
|
||||
# What to do in single-user mode.
|
||||
~~:S:wait:/sbin/sulogin
|
||||
|
||||
# /etc/init.d executes the S and K scripts upon change
|
||||
# of runlevel.
|
||||
#
|
||||
# Runlevel 0 is halt.
|
||||
# Runlevel 1 is single-user.
|
||||
# Runlevels 2-5 are multi-user.
|
||||
# Runlevel 6 is reboot.
|
||||
|
||||
l0:0:wait:/etc/init.d/rc 0
|
||||
l1:1:wait:/etc/init.d/rc 1
|
||||
l2:2:wait:/etc/init.d/rc 2
|
||||
l3:3:wait:/etc/init.d/rc 3
|
||||
l4:4:wait:/etc/init.d/rc 4
|
||||
l5:5:wait:/etc/init.d/rc 5
|
||||
l6:6:wait:/etc/init.d/rc 6
|
||||
# Normally not reached, but fallthrough in case of emergency.
|
||||
z6:6:respawn:/sbin/sulogin
|
||||
|
||||
# What to do when CTRL-ALT-DEL is pressed.
|
||||
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
|
||||
|
||||
# Action on special keypress (ALT-UpArrow).
|
||||
#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work."
|
||||
|
||||
# What to do when the power fails/returns.
|
||||
pf::powerwait:/etc/init.d/powerfail start
|
||||
pn::powerfailnow:/etc/init.d/powerfail now
|
||||
po::powerokwait:/etc/init.d/powerfail stop
|
||||
|
||||
# /sbin/getty invocations for the runlevels.
|
||||
#
|
||||
# The "id" field MUST be the same as the last
|
||||
# characters of the device (after "tty").
|
||||
#
|
||||
# Format:
|
||||
# <id>:<runlevels>:<action>:<process>
|
||||
#
|
||||
# Note that on most Debian systems tty7 is used by the X Window System,
|
||||
# so if you want to add more getty's go ahead but skip tty7 if you run X.
|
||||
#
|
||||
1:2345:respawn:/sbin/getty 38400 tty1
|
||||
2:23:respawn:/sbin/getty 38400 tty2
|
||||
3:23:respawn:/sbin/getty 38400 tty3
|
||||
4:23:respawn:/sbin/getty 38400 tty4
|
||||
5:23:respawn:/sbin/getty 38400 tty5
|
||||
6:23:respawn:/sbin/getty 38400 tty6
|
||||
|
||||
# Example how to put a getty on a serial line (for a terminal)
|
||||
#
|
||||
T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
|
||||
#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100
|
||||
|
||||
# Example how to put a getty on a modem line.
|
||||
#
|
||||
#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3
|
||||
|
||||
s:23:respawn:/usr/bin/tail -F /var/log/squid/access.log /var/log/syslog >/dev/tty1 2>&1
|
||||
9
noc/configs/modules
Normal file
9
noc/configs/modules
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# /etc/modules: kernel modules to load at boot time.
|
||||
#
|
||||
# This file should contain the names of kernel modules that are
|
||||
# to be loaded at boot time, one per line. Comments begin with
|
||||
# a "#", and everything on the line after them are ignored.
|
||||
ipv6
|
||||
capability
|
||||
e100
|
||||
e1000
|
||||
11
noc/configs/network/if-down.d/openvpn
Executable file
11
noc/configs/network/if-down.d/openvpn
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
OPENVPN=/etc/init.d/openvpn
|
||||
|
||||
if [ ! -x $OPENVPN ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -n "$IF_OPENVPN" ]; then
|
||||
$OPENVPN stop $IF_OPENVPN
|
||||
fi
|
||||
27
noc/configs/network/if-post-down.d/vlan
Executable file
27
noc/configs/network/if-post-down.d/vlan
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
# If IFACE is an automagic vlan interface (without the vlan-raw-device
|
||||
# parameter) then let's try to discover the magic here.. Another way would be
|
||||
# to just probe for the right device name in /proc/net/vlan
|
||||
|
||||
case "$IFACE" in
|
||||
eth*.0*)
|
||||
IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/"`
|
||||
;;
|
||||
eth*.*)
|
||||
IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/"`
|
||||
;;
|
||||
*) exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$IF_VLAN_RAW_DEVICE" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
if [ ! -x /sbin/vconfig ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
vconfig rem $IFACE
|
||||
47
noc/configs/network/if-pre-up.d/vlan
Executable file
47
noc/configs/network/if-pre-up.d/vlan
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Most of this stuff is to enable vlans
|
||||
|
||||
case "$IFACE" in
|
||||
vlan0*)
|
||||
vconfig set_name_type VLAN_PLUS_VID
|
||||
VLANID=`echo $IFACE|sed "s/vlan0*//"`
|
||||
;;
|
||||
vlan*)
|
||||
vconfig set_name_type VLAN_PLUS_VID_NO_PAD
|
||||
VLANID=`echo $IFACE|sed "s/vlan0*//"`
|
||||
;;
|
||||
eth*.0*)
|
||||
vconfig set_name_type DEV_PLUS_VID
|
||||
VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g"`
|
||||
IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/"`
|
||||
;;
|
||||
eth*.*)
|
||||
vconfig set_name_type DEV_PLUS_VID_NO_PAD
|
||||
VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g"`
|
||||
IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/"`
|
||||
;;
|
||||
*) exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$IF_VLAN_RAW_DEVICE" ]
|
||||
then
|
||||
if [ ! -x /sbin/vconfig ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
if ! ip link show dev "$IF_VLAN_RAW_DEVICE" > /dev/null
|
||||
then
|
||||
echo "$IF_VLAN_RAW_DEVICE does not exist, unable to create $IFACE"
|
||||
exit 1
|
||||
fi
|
||||
ip link set up dev $IF_VLAN_RAW_DEVICE
|
||||
vconfig add $IF_VLAN_RAW_DEVICE $VLANID
|
||||
fi
|
||||
|
||||
# This is not vlan specific, and should actually go somewhere else.
|
||||
if [ -n "$IF_HW_MAC_ADDRESS" ]
|
||||
then
|
||||
ip link set $IFACE address $IF_HW_MAC_ADDRESS
|
||||
fi
|
||||
18
noc/configs/network/if-up.d/ip
Executable file
18
noc/configs/network/if-up.d/ip
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
# This should probably go into ifupdown
|
||||
# But usually only those with lots of interfaces (vlans) need these
|
||||
if [ -d /proc/sys/net/ipv4/conf/$IFACE ]
|
||||
then
|
||||
if [ -n "$IF_IP_PROXY_ARP" ] && [ "$IF_IP_PROXY_ARP" -eq "1" ]
|
||||
then
|
||||
echo 1 > /proc/sys/net/ipv4/conf/$IFACE/proxy_arp
|
||||
else
|
||||
echo 0 > /proc/sys/net/ipv4/conf/$IFACE/proxy_arp
|
||||
fi
|
||||
if [ -n "$IF_IP_RP_FILTER" ] && [ "$IF_IP_RP_FILTER" -eq "0" ]
|
||||
then
|
||||
echo 0 > /proc/sys/net/ipv4/conf/$IFACE/rp_filter
|
||||
else
|
||||
echo 1 > /proc/sys/net/ipv4/conf/$IFACE/rp_filter
|
||||
fi
|
||||
fi
|
||||
10
noc/configs/network/if-up.d/ntp-server
Executable file
10
noc/configs/network/if-up.d/ntp-server
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# remove (or comment out) the next line if your network addresses change
|
||||
exit 0
|
||||
|
||||
case $IFACE in
|
||||
eth*)
|
||||
/etc/init.d/ntp-server restart
|
||||
;;
|
||||
esac
|
||||
11
noc/configs/network/if-up.d/openvpn
Executable file
11
noc/configs/network/if-up.d/openvpn
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
OPENVPN=/etc/init.d/openvpn
|
||||
|
||||
if [ ! -x $OPENVPN ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -n "$IF_OPENVPN" ]; then
|
||||
$OPENVPN start $IF_OPENVPN
|
||||
fi
|
||||
7
noc/configs/network/ifstate
Normal file
7
noc/configs/network/ifstate
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
lo=lo
|
||||
bond0=bond0
|
||||
vlan24=vlan24
|
||||
vlan22=vlan22
|
||||
vlan25=vlan25
|
||||
vlan42=vlan42
|
||||
vlan23=vlan23
|
||||
88
noc/configs/network/interfaces
Normal file
88
noc/configs/network/interfaces
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
#/etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
|
||||
|
||||
# The loopback interface
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
# The first network card - this entry was created during the Debian installation
|
||||
# (network, broadcast and gateway are optional)
|
||||
#auto eth1
|
||||
#iface eth1 inet static
|
||||
# address 192.168.178.2
|
||||
# netmask 255.255.255.0
|
||||
# network 192.168.178.0
|
||||
# broadcast 192.168.178.255
|
||||
# gateway 192.168.178.1
|
||||
|
||||
|
||||
auto bond0
|
||||
iface bond0 inet static
|
||||
pre-up /sbin/modprobe bonding mode=802.3ad
|
||||
up /sbin/ifenslave bond0 eth0
|
||||
up /sbin/ifenslave bond0 eth1
|
||||
address 172.16.0.1
|
||||
broadcast 172.16.3.255
|
||||
netmask 255.255.252.0
|
||||
|
||||
iface bond0 inet6 static
|
||||
address 2001:748:306::1
|
||||
netmask 64
|
||||
|
||||
# WLAN
|
||||
auto vlan24
|
||||
iface vlan24 inet static
|
||||
vlan_raw_device bond0
|
||||
address 172.16.4.1
|
||||
broadcast 172.16.8.255
|
||||
netmask 255.255.252.0
|
||||
|
||||
iface vlan24 inet6 static
|
||||
address 2001:748:306:24::1
|
||||
netmask 64
|
||||
|
||||
# pptp
|
||||
auto vlan22
|
||||
iface vlan22 inet static
|
||||
vlan_raw_device bond0
|
||||
address 192.168.178.2
|
||||
netmask 255.255.255.0
|
||||
|
||||
iface vlan22 inet6 static
|
||||
address 2001:748:306:22::1
|
||||
netmask 64
|
||||
|
||||
# freifunk
|
||||
auto vlan23
|
||||
iface vlan23 inet static
|
||||
vlan_raw_device bond0
|
||||
address 10.112.23.1
|
||||
netmask 255.255.255.255
|
||||
|
||||
iface vlan23 inet6 static
|
||||
address 2001:748:306:23::1
|
||||
netmask 64
|
||||
|
||||
# NOC
|
||||
auto vlan42
|
||||
iface vlan42 inet static
|
||||
vlan_raw_device bond0
|
||||
address 172.16.42.1
|
||||
broadcast 172.16.42.255
|
||||
netmask 255.255.255.0
|
||||
up /usr/local/bin/network-foo
|
||||
|
||||
iface vlan42 inet6 static
|
||||
address 2001:748:306:42::1
|
||||
netmask 64
|
||||
|
||||
# AFU Druck
|
||||
auto vlan25
|
||||
iface vlan25 inet static
|
||||
vlan_raw_device bond0
|
||||
address 172.16.25.1
|
||||
broadcast 172.16.25.255
|
||||
netmask 255.255.255.0
|
||||
|
||||
iface vlan25 inet6 static
|
||||
address 2001:748:306:25::1
|
||||
netmask 64
|
||||
0
noc/configs/network/interfaces.dpkg-new
Normal file
0
noc/configs/network/interfaces.dpkg-new
Normal file
3
noc/configs/network/options
Normal file
3
noc/configs/network/options
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
ip_forward=yes
|
||||
spoofprotect=yes
|
||||
syncookies=no
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue