-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
87 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# babeld | ||
# babeld control | ||
ipt -A INPUT -i lo -p tcp --dport 33123 -j ACCEPT | ||
|
||
# babeld routing | ||
{% for ifname in babel_interfaces %} | ||
ipt6 -A INPUT -i {{ifname}} -p udp --dport 6696 -j ACCEPT | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
# batman | ||
ipt6 -A INPUT -i {{ main_bridge }} -p udp --dport 1001 -j ACCEPT | ||
ipt6 -A INPUT -i vpn-{{ site_code }}-legacy -p udp --dport 1001 -j ACCEPT | ||
ipt6 -A INPUT -i vpn-{{ site_code }} -p udp --dport 1001 -j ACCEPT | ||
|
||
# babel | ||
ipt6 -A INPUT -i lo -p udp --dport 1001 -j ACCEPT | ||
ipt6 -A INPUT -i babel-ffhb -p udp --dport 1001 -j ACCEPT | ||
ipt6 -A INPUT -i mmfd0 -p udp --dport 1001 -j ACCEPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
mmfd_repository: "https://dl.ffm.freifunk.net/debian-packages/ sid main" | ||
mmfd_repository_key: 390BF305 | ||
|
||
babel_bridge: babel-{{ site_code }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
- name: restart mmfd | ||
service: name=mmfd state=restarted | ||
|
||
- name: reload systemd | ||
command: systemctl daemon-reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
- name: Add repository key for babeld and utils | ||
apt_key: keyserver="{{ pgp_keyserver }}" id="{{mmfd_repository_key}}" | ||
|
||
- name: Add repository for babeld and utils | ||
apt_repository: repo="deb {{mmfd_repository}}" | ||
|
||
- name: Install mmfd (babel utils) | ||
apt: name="mmfd" | ||
|
||
- name: Install interfaces file | ||
template: > | ||
src=interfaces | ||
dest=/etc/network/interfaces.d/babel-{{site_code}}-mmfd | ||
- name: Configure firewall | ||
template: src=firewall.sh dest={{ firewall_path }}/35-babel-{{site_code}}-mmfd | ||
when: firewall_enabled | ||
notify: reload firewall | ||
|
||
- name: Install mmfd service | ||
template: src=mmfd.service dest=/etc/systemd/system/mmfd.service | ||
notify: | ||
- reload systemd | ||
- restart mmfd | ||
|
||
- name: Enable mmfd | ||
service: | ||
name: mmfd | ||
enabled: yes | ||
state: started | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# mmfd | ||
ipt -A INPUT -i {{babel_bridge}} -p udp --dport 27275 -j ACCEPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# {{ ansible_managed }} | ||
|
||
allow-hotplug mmfd0 | ||
auto mmfd0 | ||
iface mmfd0 inet6 static | ||
address fe80::1 | ||
netmask 64 | ||
post-up ip r add ff05::2:1001/128 dev mmfd0 table local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=mmfd | ||
Wants=basic.target | ||
After=basic.target network.target babeld.service | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/local/bin/mmfd | ||
KillMode=process | ||
Restart=always | ||
RestartSec=3 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |