Skip to content

Instantly share code, notes, and snippets.

@chrisnew
Last active January 1, 2022 00:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisnew/2d4298174b188fab74e05e4f20a51173 to your computer and use it in GitHub Desktop.
Save chrisnew/2d4298174b188fab74e05e4f20a51173 to your computer and use it in GitHub Desktop.
`fastd -c fastd-hofheim.conf` und dann `tap0` von QEMU ins `br-hofheim` mit `brctl addif br-hofheim tap0`
# Log errors to stderr
log level error;
# Log warnings to a log file
log to syslog as "fastd-hofheim" level warn;
# Set the interface name
interface "fastd-hofheim";
# Disable encryption
method "null";
# Bind to any IPv4 and IPv6 address with a fixed port
bind any:11007;
# fastd needs a key despite the disabled encryption. generate with "fastd --generate-key"
#
# Der öffentliche Schlüssel für die KeyXchange Admins kann
# mit "fastd -c /etc/fastd/<hoodname>/fastd.conf --show-key" angezeigt werden.
secret "XXX-GENERIEREN-UND-HIER-EINFUEGEN-XXX";
# WICHTIG: diese Peers kommen aus der KeyXchange API
# URL: https://keyserver.freifunk-franken.de/v2/index.php?hoodid=4
peer "test" {
remote ipv4 "hofheim.fff.nixxda.net" port 10000;
key "e97de5acd15691a3f18c433b7e89543dedf06fa8e36d43ef01388e1c4ebbe13e";
}
# See https://fastd.readthedocs.io/en/v18/manual/mtu.html
# Must not be changed! It has to be the same for both server and all clients.
mtu 1426;
# Skript starten, sobald fastd Interface angelegt ist. Damit wird es zu batman hinzugefügt.
secure handshakes no;
on up "
ip link set fastd-hofheim up
ip link add bat-hofheim type batadv
batctl -m bat-hofheim if add fastd-hofheim
sysctl -w net.ipv6.conf.bat-hofheim.autoconf=0
ip link set bat-hofheim up
brctl addbr br-hofheim
sysctl -w net.ipv6.conf.br-hofheim.autoconf=0
ip link set br-hofheim up
brctl addif br-hofheim bat-hofheim
";
on down "
ip link del bat-hofheim
ip link del br-hofheim
";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment