Update scripts
This commit is contained in:
parent
f13ebc703f
commit
c2f696cae3
23
addpeer.sh
23
addpeer.sh
|
@ -34,14 +34,6 @@ sudo tee -a /etc/systemd/network/$iface.network << END
|
|||
Name = $iface
|
||||
END
|
||||
|
||||
if [ ! -z "$tun6" ]; then
|
||||
sudo tee -a /etc/systemd/network/$iface.network << END
|
||||
|
||||
[Address]
|
||||
Address = $ip6/128
|
||||
Peer = $tun6/128
|
||||
END
|
||||
fi
|
||||
|
||||
if [ ! -z "$tun4" ]; then
|
||||
sudo tee -a /etc/systemd/network/$iface.network << END
|
||||
|
@ -50,15 +42,26 @@ sudo tee -a /etc/systemd/network/$iface.network << END
|
|||
Address = $ip4/32
|
||||
Peer = $tun4/32
|
||||
END
|
||||
fi
|
||||
|
||||
sudo tee -a /etc/bird/peers/$node.conf << END
|
||||
protocol bgp $node from dnpeers {
|
||||
neighbor $tun4 as $asn;
|
||||
}
|
||||
|
||||
END
|
||||
fi
|
||||
|
||||
if [ ! -z "$tun6" ]; then
|
||||
sudo tee -a /etc/systemd/network/$iface.network << END
|
||||
|
||||
[Address]
|
||||
Address = $ip6/128
|
||||
Peer = $tun6/128
|
||||
END
|
||||
|
||||
sudo tee -a /etc/bird/peers/$node.conf << END
|
||||
protocol bgp ${node}_v6 from dnpeers {
|
||||
neighbor $tun6%$iface as $asn;
|
||||
}
|
||||
END
|
||||
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue