import from old webserver
This commit is contained in:
commit
ef633b2cf4
182 changed files with 69233 additions and 0 deletions
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
|
Loading…
Add table
Add a link
Reference in a new issue