summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Yann Wettengel <niyawe@niyawe.de>2019-09-23 22:56:20 +0200
committerNiklas Yann Wettengel <niyawe@niyawe.de>2019-09-23 22:56:20 +0200
commit1738af3a5dd29c89e27e33a890389b5ac4b71843 (patch)
treef5580111cbc4b6166c90a10ff7370c03632f83e5
parent27432b0ddc2ee1010f7b3db29d7cdf7fdb6ab128 (diff)
install mesh-announce
-rw-r--r--roles/configure_iptables/templates/ip6tables.rules2
-rw-r--r--roles/install_mesh-announce/tasks/main.yml24
-rw-r--r--roles/install_mesh-announce/templates/respondd.service.j212
-rw-r--r--setup_fastd.yml1
4 files changed, 39 insertions, 0 deletions
diff --git a/roles/configure_iptables/templates/ip6tables.rules b/roles/configure_iptables/templates/ip6tables.rules
index f8da091..d194ae6 100644
--- a/roles/configure_iptables/templates/ip6tables.rules
+++ b/roles/configure_iptables/templates/ip6tables.rules
@@ -51,6 +51,8 @@ COMMIT
# fastd
-A INPUT -s 2a03:2260:1016::/48 -p udp -m udp --dport 10010:10021 -j DROP
-A INPUT -p udp -m udp --dport 10010:10021 -j ACCEPT
+# respondd
+-A INPUT -i bat+ -p udp -m udp --dport 1001 -j ACCEPT
# wireguard_mesh
{% for site in sites %}
-A INPUT -p udp -m udp --dport {{ site.wireguard_mesh_port }} -j ACCEPT
diff --git a/roles/install_mesh-announce/tasks/main.yml b/roles/install_mesh-announce/tasks/main.yml
new file mode 100644
index 0000000..ea81a45
--- /dev/null
+++ b/roles/install_mesh-announce/tasks/main.yml
@@ -0,0 +1,24 @@
+---
+- name: clone mesh-announce repo
+ git:
+ repo: https://github.com/FreifunkMYK/mesh-announce.git
+ dest: /opt/mesh-announce
+
+- name: install mesh-announce dependencies
+ pacman:
+ name:
+ - lsb-release
+ - ethtool
+ state: present
+
+- name: create respondd service
+ template:
+ src: respondd.service.j2
+ dest: /etc/systemd/system/respondd.service
+ mode: 0644
+
+- name: start and enable respondd service
+ systemd:
+ name: respondd
+ state: started
+ enabled: yes
diff --git a/roles/install_mesh-announce/templates/respondd.service.j2 b/roles/install_mesh-announce/templates/respondd.service.j2
new file mode 100644
index 0000000..53970a7
--- /dev/null
+++ b/roles/install_mesh-announce/templates/respondd.service.j2
@@ -0,0 +1,12 @@
+[Unit]
+Description=Respondd
+After=network.target
+
+[Service]
+ExecStart=/opt/mesh-announce/respondd.py -d /opt/mesh-announce/providers {% for site in sites %}-i bat{{ site.name }} -i vpn{{ site.name }} -b bat{{ site.name }} {% endfor %}
+
+Restart=always
+Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+
+[Install]
+WantedBy=multi-user.target
diff --git a/setup_fastd.yml b/setup_fastd.yml
index 9bdd93d..d9d237b 100644
--- a/setup_fastd.yml
+++ b/setup_fastd.yml
@@ -22,6 +22,7 @@
- install_wireguard_backbone
- install_babeld
- install_fastd
+ - install_mesh-announce
- install_monitoring
- install_iperf3
- update_ssh_keys