Changes
This commit is contained in:
parent
7b220dab8d
commit
3e0c444272
14 changed files with 77 additions and 49 deletions
74
aio.sh
74
aio.sh
|
@ -1,4 +1,6 @@
|
|||
echo Installing bird and wireguard
|
||||
#!/bin/bash
|
||||
|
||||
echo Installing bird and wireguard. Confirm!
|
||||
|
||||
apt install wireguard-tools bird2
|
||||
systemctl stop bird
|
||||
|
@ -10,71 +12,47 @@ echo Generating WG keypair
|
|||
wg genkey > /etc/wireguard/privkey
|
||||
cat /etc/wireguard/privkey | wg pubkey > /etc/wireguard/pubkey
|
||||
|
||||
cat <<EOF > /etc/wireguard/template.conf
|
||||
[Interface]
|
||||
ListenPort = 42401
|
||||
PrivateKey = [...]
|
||||
PostUp = /sbin/ip addr add dev %i fe80::129:3/128 peer fe80::129:1/128
|
||||
Table = off
|
||||
|
||||
[Peer]
|
||||
Endpoint = pl1.420129.xyz:42403
|
||||
PublicKey = [...]
|
||||
PresharedKey = [...]
|
||||
AllowedIPs = ::/0
|
||||
EOF
|
||||
cp etc/wireguard/* /etc/wireguard/
|
||||
|
||||
###########################################
|
||||
|
||||
echo Now installing sysctl
|
||||
|
||||
cat <<EOF > /etc/sysctl.d/99-dn42.conf
|
||||
net.ipv6.conf.all.forwarding=1
|
||||
EOF
|
||||
|
||||
cp etc/sysctl.d/* /etc/sysctl.d/
|
||||
sysctl --system
|
||||
|
||||
###########################################
|
||||
|
||||
echo Now installing ROA updater
|
||||
|
||||
cat <<EOF > /etc/systemd/system/dn42-roa.service
|
||||
[Unit]
|
||||
Description=Update DN42 ROA
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=curl -sfSLR -o /etc/bird/roa_dn42_v6.conf -z /etc/bird/roa_dn42_v6.conf https://dn42.burble.com/roa/dn42_roa_bird2_6.conf
|
||||
ExecStart=birdc configure
|
||||
EOF
|
||||
|
||||
cat <<EOF > /etc/systemd/system/dn42-roa.timer
|
||||
[Unit]
|
||||
Description=Update DN42 ROA periodically
|
||||
|
||||
[Timer]
|
||||
OnBootSec=2m
|
||||
OnUnitActiveSec=15m
|
||||
AccuracySec=1m
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
EOF
|
||||
|
||||
cp etc/systemd/system/* /etc/systemd/system
|
||||
systemctl enable --now dn42-roa.timer
|
||||
|
||||
###########################################
|
||||
|
||||
echo Now installing networkd templates you will edit later
|
||||
|
||||
cp etc/systemd/network* /etc/systemd/network
|
||||
|
||||
###########################################
|
||||
|
||||
echo Now installing bird configs
|
||||
|
||||
mkdir /etc/bird/peers
|
||||
curl -Lo /etc/bird/bird.conf https://git.m724.eu/Minecon724/dn42-configs/raw/branch/master/bird/bird.conf
|
||||
curl -Lo /etc/bird/community_filters.conf https://git.m724.eu/Minecon724/dn42-configs/raw/branch/master/bird/community_filters.conf
|
||||
curl -Lo /etc/bird/babel.conf https://git.m724.eu/Minecon724/dn42-configs/raw/branch/master/bird/babel.conf
|
||||
cp -r etc/bird/* /etc/bird
|
||||
|
||||
###########################################
|
||||
|
||||
echo Don\'t forget to create an igp-dummy0
|
||||
echo After done configuring, do:
|
||||
echo systemctl start bird
|
||||
echo Now installing pingfinder
|
||||
|
||||
cp usr/local/bin /usr/local/bin
|
||||
systemctl enable pingfinder.timer
|
||||
|
||||
###########################################
|
||||
|
||||
echo Don\'t forget to configure networkd!
|
||||
echo And add some peers!
|
||||
echo And configure pingfinder in /etc/systemd/system/pingfinder.service
|
||||
echo
|
||||
echo After done configuring, do:
|
||||
echo sudo ./finish.sh
|
||||
echo
|
||||
|
|
2
etc/sysctl.d/99-dn42.conf
Normal file
2
etc/sysctl.d/99-dn42.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
net.ipv6.conf.all.forwarding=1
|
||||
# rp_filter not disabled; ipv4 thing
|
|
@ -2,4 +2,4 @@
|
|||
Name=igp-dummy0
|
||||
|
||||
[Network]
|
||||
Address = fdfe:8d0:7450:100::/56
|
||||
Address = 2001:db8:adde::/56
|
7
etc/systemd/system/dn42-roa.service
Normal file
7
etc/systemd/system/dn42-roa.service
Normal file
|
@ -0,0 +1,7 @@
|
|||
[Unit]
|
||||
Description=Update DN42 ROA
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=curl -sfSLR -o /etc/bird/roa_dn42_v6.conf -z /etc/bird/roa_dn42_v6.conf https://lfs.m724.eu/roa/dn42_roa_bird2_6.conf
|
||||
ExecStart=birdc configure
|
10
etc/systemd/system/dn42-roa.timer
Normal file
10
etc/systemd/system/dn42-roa.timer
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Update DN42 ROA periodically
|
||||
|
||||
[Timer]
|
||||
OnBootSec=2m
|
||||
OnUnitActiveSec=15m
|
||||
AccuracySec=1m
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
7
etc/systemd/system/pingfinder.service
Normal file
7
etc/systemd/system/pingfinder.service
Normal file
|
@ -0,0 +1,7 @@
|
|||
[Unit]
|
||||
Description=Pingfinder
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
Environment=UUID=[...]
|
||||
ExecStart=/opt/pingfinder.sh
|
9
etc/systemd/system/pingfinder.timer
Normal file
9
etc/systemd/system/pingfinder.timer
Normal file
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Pingfind periodically
|
||||
|
||||
[Timer]
|
||||
OnBootSec=1m
|
||||
OnUnitActiveSec=1m
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
11
etc/wireguard/template.conf
Normal file
11
etc/wireguard/template.conf
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Interface]
|
||||
ListenPort = 42401
|
||||
PrivateKey = [...]
|
||||
PostUp = /sbin/ip addr add dev %i fe80::129:3/128 peer fe80::129:1/128
|
||||
Table = off
|
||||
|
||||
[Peer]
|
||||
Endpoint = pl1.420129.xyz:42403
|
||||
PublicKey = [...]
|
||||
PresharedKey = [...]
|
||||
AllowedIPs = ::/0
|
4
finish.sh
Normal file
4
finish.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
systemctl start bird
|
||||
systemctl start pingfinder.timer
|
Loading…
Add table
Add a link
Reference in a new issue