Skip to content

Serverconfig

Ranlvor edited this page Feb 18, 2015 · 9 revisions

"Etwas veraltete Gateway-Aufbauanleitung - siehe hier":https://wiki.freifunk.net/Freifunk_Hamburg/Gateway#Einwahlknoten

Batman-ADV:
 wir beziehen das von der original webseite
 http://www.open-mesh.org/projects/open-mesh/wiki/Download
 und bauen das in /usr/src und make installen das auch
 sind ja nur ein .ko, und ein binary (für batctl)
muss bei Kernelupdate irgendwie mitgezogen werden


apt-get install batctl fastd bridge-utils git isc-dhcp-server radvd openvpn iptables-persistent dnsmasq tinc bird bird6 
batman-adv Version muss bei Firmware und Server übereinsteimmen. 2013.4 ist nicht upgradefähig, also sollten wir mit 2014.4 direkt starten.



nano /etc/ssh/sshd_config 
eintragen:
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes

root-Crontabs

*/5 * * * *   /root/bin/autoupdate_fastd_keys.sh
*/5 * * * *   /home/dhcpstatic/updateStatics.sh
*/5 * * * *   /root/ffmap-backend/mkmap.sh /var/www/html/map
*   * * * *   /root/ffnord-alfred-announce/announce.sh -i br-fftr

//TODO: Non-Root-Crontabs

ifconfig

bat0      Link encap:Ethernet  HWaddr de:87:4a:94:cd:b3  
          inet6 addr: fe80::dc87:4aff:fe94:cdb3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4928669 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5776814 errors:0 dropped:11134 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:957494457 (957.4 MB)  TX bytes:6716803311 (6.7 GB)

br-fftr   Link encap:Ethernet  HWaddr de:87:4a:94:cd:b3  
          inet addr:10.172.0.11  Bcast:10.172.255.255  Mask:255.255.0.0
          inet6 addr: fe80::5487:60ff:fe2b:2cfd/64 Scope:Link
          inet6 addr: fdca:ffee:fc0f::11/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4941432 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5788358 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:888757694 (888.7 MB)  TX bytes:6717349373 (6.7 GB)

eth0      Link encap:Ethernet  HWaddr 52:54:00:ab:9b:10  
          inet addr:192.168.101.50  Bcast:192.168.101.51  Mask:255.255.255.252
          inet6 addr: 2a01:4f8:201:4108:84::2/80 Scope:Global
          inet6 addr: fe80::5054:ff:feab:9b10/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12339183 errors:0 dropped:2 overruns:0 frame:0
          TX packets:15761045 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:8785310155 (8.7 GB)  TX bytes:9038333455 (9.0 GB)

fftr-mesh-vpn Link encap:Ethernet  HWaddr 26:61:96:60:17:dc  
          inet6 addr: fe80::2461:96ff:fe60:17dc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1406  Metric:1
          RX packets:5936839 errors:0 dropped:86 overruns:0 frame:0
          TX packets:10381343 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:1145923715 (1.1 GB)  TX bytes:7109506770 (7.1 GB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:120361 errors:0 dropped:0 overruns:0 frame:0
          TX packets:120361 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:55640410 (55.6 MB)  TX bytes:55640410 (55.6 MB)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:172.31.240.21  P-t-P:172.31.240.21  Mask:255.255.240.0
          inet6 addr: 2002:4d57:300a:fffe::106b/64 Scope:Global
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:3228030 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2776148 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:4062591090 (4.0 GB)  TX bytes:235101567 (235.1 MB)

/etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

auto eth0
iface eth0 inet6 static
# Haupt-IPv6-Adresse des Servers
address 2a01:4f8:201:4108:84::2
netmask 80
gateway 2a01:4f8:201:4108:84::1


auto br-fftr
iface br-fftr inet6 static
bridge-ports none
address fdca:ffee:fc0f::0:11
netmask 64

iface br-fftr inet static
address 10.172.0.11
netmask 255.255.0.0
allow-hotplug bat0

iface bat0 inet6 manual
pre-up modprobe batman-adv
pre-up batctl if add fftr-mesh-vpn
up ip link set $IFACE up
post-up brctl addif br-fftr $IFACE
post-up batctl it 10000
post-up /sbin/ip rule add from all fwmark 0x1 table 42
pre-down brctl delif br-fftr $IFACE || true
down ip link set $IFACE down
Clone this wiki locally