From b1f766c9469c2e6f79bf5d4763593e29db0441f9 Mon Sep 17 00:00:00 2001 From: Freifunk Troisdorf Date: Thu, 24 Jan 2019 21:10:11 +0100 Subject: [PATCH] Tunneldigger repaired / new repo --- files/l2tp_broker.cfg | 14 +++++++++++++- files/start-broker.sh | 8 +++++--- install.sn.yml | 28 ++++++++++++++++++---------- 3 files changed, 36 insertions(+), 14 deletions(-) diff --git a/files/l2tp_broker.cfg b/files/l2tp_broker.cfg index 8060e21..a741273 100644 --- a/files/l2tp_broker.cfg +++ b/files/l2tp_broker.cfg @@ -4,7 +4,7 @@ address={{ ansible_default_ipv4.address }} ; Ports where the broker will listen on port={{ sn_l2tp_tb_port }} ; Interface with that IP address -interface=eth0 +interface=ens18 ; Maximum number of cached cookies, required for establishing a ; session with the broker max_cookies=1024 @@ -23,6 +23,18 @@ pmtu_discovery=false ; namespacing to work namespace=troisdorf +; Reject connections if there are less than N seconds since the last connection. +; Can be less than a second (e.g., 0.1). +connection_rate_limit=2 + +; Set PMTU to a fixed value. Use 0 for automatic PMTU discovery. A non-0 value also disables +; PMTU discovery on the client side, by having the server not respond to client-side PMTU +; discovery probes. +pmtu=0 + +; The batman device of this Hood (e.g. bat2) +batdev=bat0 + [log] ; Log filename filename=/var/log/tunneldigger-broker.log diff --git a/files/start-broker.sh b/files/start-broker.sh index 22450e0..86c0837 100644 --- a/files/start-broker.sh +++ b/files/start-broker.sh @@ -1,9 +1,11 @@ #!/bin/bash -WDIR=/srv/tunneldigger -VIRTUALENV_DIR=/srv/tunneldigger +WDIR=/srv/tunneldigger/env_tunneldigger +VIRTUALENV_DIR=/srv/tunneldigger/env_tunneldigger cd $WDIR source $VIRTUALENV_DIR/bin/activate -bin/python broker/l2tp_broker.py l2tp_broker.cfg +$VIRTUALENV_DIR/bin/python -m tunneldigger_broker.main ../l2tp_broker.cfg +#bin/python broker/l2tp_broker.py ../l2tp_broker.cfg + diff --git a/install.sn.yml b/install.sn.yml index f1b08a7..e73ea67 100644 --- a/install.sn.yml +++ b/install.sn.yml @@ -9,7 +9,7 @@ user: root gather_facts: False vars: - snversion: master_v3.1.1 + snversion: master_v3.1.3 batmanversion: v2017.4 common_required_packages: - git @@ -44,6 +44,9 @@ - virtualenv - batman-adv - batctl + - libffi-dev + - libnetfilter-conntrack-dev + - libnfnetlink-dev modules_required: - batman-adv - nf_conntrack_netlink @@ -88,8 +91,10 @@ # url: https://sks.pod01.fleetstreetops.com # state: present - - name: Add backport repo to source list + - name: Add Freifuck repo to source list apt_repository: repo='deb https://freifuck.de/debian stretch main' state=present + - name: Add backport repo to source list + apt_repository: repo='deb http://http.debian.net/debian stretch-backports main' state=present - name: Update apt cache apt: update_cache=yes - name: Gathering facts @@ -166,21 +171,24 @@ # shell: cd /tmp/batctl && git checkout {{ batmanversion }} && make && make install # when: getbatctl.changed - name: Get Tunneldigger - git: repo=https://github.com/Freifunk-Troisdorf/tunneldigger.git dest=/srv/tunneldigger -# git: repo=https://github.com/wlanslovenija/tunneldigger.git dest=/srv/tunneldigger version=v0.3.0 +# git: repo=https://github.com/Freifunk-Troisdorf/tunneldigger.git dest=/srv/tunneldigger +# git: repo=https://github.com/wlanslovenija/tunneldigger.git dest=/srv/tunneldigger version=v0.1.0 +# git: repo=https://github.com/wlanslovenija/tunneldigger.git dest=/srv/tunneldigger # git: repo=https://github.com/ffrl/tunneldigger.git dest=/srv/tunneldigger + git: repo=https://github.com/rohammer/tunneldigger.git dest=/srv/tunneldigger # version: release-0.22 register: tunneldigger when: aptupdates.changed - name: Configure tunneldigger - command: "{{item}}" - with_items: + raw: "cd /srv/tunneldigger && virtualenv env_tunneldigger && source env_tunneldigger/bin/activate && cd broker && python setup.py install" +# command: "{{item}}" +# with_items: # - virtualenv /srv/tunneldigger/ -p python2.7 - - virtualenv /srv/tunneldigger/ - when: tunneldigger.changed - - name: Tunneldigger requirements - pip: requirements=/srv/tunneldigger/broker/requirements.txt virtualenv=/srv/tunneldigger/ +# - virtualenv /srv/tunneldigger/ when: tunneldigger.changed +# - name: Tunneldigger requirements +# pip: requirements=/srv/tunneldigger/broker/requirements.txt virtualenv=/srv/tunneldigger/ +# when: tunneldigger.changed - name: Copy l2tp broker config template template: src=./files/{{ item }} dest=/srv/tunneldigger owner=root group=root mode=0444 with_items: "{{ broker_cfg }}"