Alles die Administration von GW1.Batman betreffend.
Es ist das Paket etckeeper mit Git als Backend installiert um den Vorteil einer Versionsverwaltung für /etc
zu haben. Nach administrativen Aufgaben einfach kurz
sudo etckeeper commit
und kurz eine Commit Message eingeben. Das Repository ist ausschließlich lokal vorhanden und wird nicht nach draußen gepusht!
(aka Nutzer mit sudo Rechten)
—-
Command | Description |
---|---|
batctl o | Show Originators |
batctl nn | show nc_nodes |
batctl bbt | backbonetanle |
batctl ping 1e:34:a8:d3:0a:eb | ping device |
bird ist eine Open-Source-Implementierung eines IPv4 als auch IPv6-fähigen TCP/IP-Routing-Daemons. Derzeit unterstützt BIRD mehrere interne Routing-Tabellen, das EGP BGP, die IGPs OSPF und RIP sowie statische Routen.
bridc ⇒ IPv4 birdc6 ⇒ IPv6
# birdc show status BIRD 1.3.7 ready. BIRD 1.3.7 Router ID is 10.139.0.9 Current server time is 14-02-2021 19:42:33 Last reboot on 11-02-2021 22:19:21 Last reconfiguration on 11-02-2021 22:19:21 Daemon is up and running
# birdc show interfaces BIRD 1.3.7 ready. lo up (index=1) MultiAccess AdminUp LinkUp Loopback Ignored MTU=16436 127.0.0.1/8 (Primary, scope host) eth0 up (index=2) MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500 37.120.160.206/22 (Primary, scope univ) gre0 DOWN (index=3) MultiAccess AdminDown LinkDown MTU=1476 backend-bab1 DOWN (index=4) PtP Multicast AdminUp LinkUp MTU=1400 backend-gw2 DOWN (index=5) PtP Multicast AdminUp LinkUp MTU=1400 backend-web DOWN (index=6) PtP Multicast AdminUp LinkUp MTU=1400 mesh-vpn DOWN (index=7) MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1312 bat0 up (index=8) MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500 10.139.0.9/16 (Primary, scope site) 10.139.0.53/16 (Secondary, scope site) mesh-vpn-backbo DOWN (index=9) MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1426
# birdc6 show interfaces BIRD 1.3.7 ready. lo up (index=1) MultiAccess AdminUp LinkUp Loopback Ignored MTU=16436 ::1/128 (Primary, scope host) eth0 up (index=2) MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500 2a03:4000:6:30c3::1/64 (Primary, scope univ) fe80::5054:6fff:fecf:e3a/64 (Unselected, scope link) gre0 DOWN (index=3) MultiAccess AdminDown LinkDown MTU=1476 backend-bab1 up (index=4) PtP Multicast AdminUp LinkUp MTU=1400 fda9:26e:5805:bab1:af1:7cb:47:af01/127 (Primary, opposite fda9:26e:5805:bab1:af1:7cb:47:af00, scope site) fe80::200:5efe:2578:a0ce/64 (Unselected, scope link) backend-gw2 up (index=5) PtP Multicast AdminUp LinkUp MTU=1400 fda9:26e:5805:bab1:aaaa::5/64 (Primary, scope site) fe80::200:5efe:2578:a0ce/64 (Unselected, scope link) backend-web up (index=6) PtP Multicast AdminUp LinkUp MTU=1400 fd43:c813:cf00:5ed5::4/127 (Primary, opposite fd43:c813:cf00:5ed5::5, scope site) fe80::200:5efe:2578:a0ce/64 (Unselected, scope link) mesh-vpn up (index=7) MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1312 fe80::d0f4:29ff:fe99:6861/64 (Primary, scope link) bat0 up (index=8) MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500 fda9:26e:5805::9/64 (Primary, scope site) fe80::a8bd:bdff:fe97:6274/64 (Unselected, scope link) mesh-vpn-backbo up (index=9) MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1426 fe80::bc98:1fff:fe07:ff52/64 (Primary, scope link)
# birdc show protocols BIRD 1.3.7 ready. name proto table state since info k_mast Kernel master up Feb11 k_frei Kernel freifunk up Feb11 device1 Device master up Feb11 p_maintbl Pipe master up Feb11 => ebgp p_ibgptbl Pipe ebgp up Feb11 => ibgp p_freitbl Pipe ibgp up Feb11 => freifunk unreachable_default Static freifunk up Feb11 static_ffmd Static ebgp up Feb11 local_ffmd Static freifunk up Feb11 vpn2 BGP ibgp start Feb11 Connect Socket: Connection timed out Bielefeld1 BGP ebgp start Feb11 Idle Bielefeld2 BGP ebgp start Feb11 Idle
Procols Verbose
# birdc show protocols all BIRD 1.3.7 ready. name proto table state since info k_mast Kernel master up Feb11 Preference: 10 Input filter: REJECT Output filter: (unnamed) Routes: 0 imported, 0 exported, 0 preferred Route change stats: received rejected filtered ignored accepted Import updates: 0 0 0 0 0 Import withdraws: 0 0 --- 0 0 Export updates: 0 0 0 --- 0 Export withdraws: 0 --- --- --- 0
Show detailed information about static routes. birdc show static local_ffmd BIRD 1.3.7 ready. 10.139.0.0/16 dev bat0 birdc show static static_ffmd BIRD 1.3.7 ready. 10.139.0.0/16 unreachable
erzeugt mullvad device
service openvpn start service openvpn stop @gw1:# service openvpn status [ ok ] VPN 'ipredator' is running.
ps -ef |grep open root 968 697 0 20:45 pts/2 00:00:00 grep open root 21285 1 0 Feb10 ? 00:00:22 /usr/sbin/openvpn --writepid /run/openvpn/ipredator.pid --daemon ovpn-ipredator --status /run/openvpn/ipredator.status 10 --cd /etc/openvpn --config /etc/openvpn/ipredator.conf
/etc/init.d/isc-dhcp-server stop
/etc/init.d/isc-dhcp-server start
/etc/init.d/isc-dhcp-server status Status of ISC DHCP server: dhcpd is running.
tcpdump -n -i br0 port bootps or port bootpc
root@gw1:/home/kwasir# ps -ef |grep dhcp root 903 697 0 20:33 pts/2 00:00:00 grep dhcp root 3296 1 0 Jan31 ? 00:00:21 /usr/sbin/dhcpd -q -6 -cf /etc/dhcp/dhcpdv6.conf -pf /var/run/dhcpdv6.pid bat0 root 21304 1 0 Feb10 ? 00:00:21 /usr/sbin/dhcpd -cf /etc/dhcp/dhcpd.conf bat0
A.L.F.R.E.D - Almighty Lightweight Fact Remote Exchange Daemon
alfred is a user space daemon for distributing arbitrary local information over the mesh/network in a decentralized fashion. This data can be anything which appears to be useful - originally designed to replace the batman-adv visualization (vis), you may distribute hostnames, phone books, administration information, DNS information, the local weather forecast …
Alfred_Architekture https://github.com/ffnord/alfred/blob/master/README
service alfred start [ ok ] Starting A.L.F.R.E.D: alfred.
service alfred stop
service alfred status [ ok ] alfred is running.
ps -ef |grep alfred root 1149 1 0 21:03 ? 00:00:00 /usr/sbin/alfred -i bat0 -b bat0 -m
Sind Nodes online, die gluon-announce installiert und am laufen haben, sollte man json/gzip Daten erhalten:
alfred -r 158 -u /var/run/alfred-wi.sock [...] { "xx:xx:xx:xx:xx:xx", "\xxx\xxx [...] \xxx\xxx" }, [...]
Ist alfred-json installiert kann man sich die Daten gleich mit entpacken lassen:
alfred -r 158 -s /var/run/alfred.sock -z [...] { "xx:xx:xx:xx:xx:xx": { "location": { "longitude": 0.0, "latitude": 0.0 }, "network": { "mac": "xx:xx:xx:xx:xx:xx", [...] }, [...] }, [...] } [...]
Hier nervt: Zur Angabe des Sockets nutzt alfred-json den Flag -s, alfred hingegen -u.
Wenn bereits ein Router in der Hood ist, kann mit
alfred -r 158 -u /var/run/xx.sock
https://github.com/FreifunkFranken/alfred-json
alfred-json -zr 158 -s /var/run/alfred.sock alfred-json -zr 158
Datensatz 158 und 159 sollten daten liefern Bzw. Datensatz 1
# /etc/init.d/unbound status [ ok ] unbound is running. # /etc/init.d/unbound start [ ok ] unbound is starting
# /etc/init.d/unbound stop [ ok ] unbound is stopping