Initial commit
This commit is contained in:
commit
f1d2e242d8
13
Dockerfile
Normal file
13
Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
|||
FROM alpine:3.18
|
||||
|
||||
RUN apk add --no-cache --update-cache frr wireguard-tools tini
|
||||
|
||||
RUN mkdir -p /var/run/frr
|
||||
RUN chown -R frr:frr /etc/frr /var/run/frr
|
||||
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
|
||||
CMD ["sh", "-c", "/usr/local/bin/docker-entrypoint.sh"]
|
1
config/frr/daemons
Normal file
1
config/frr/daemons
Normal file
|
@ -0,0 +1 @@
|
|||
ospfd=yes
|
7
config/frr/ospfd.conf
Normal file
7
config/frr/ospfd.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
interface wg0
|
||||
ip ospf area 0.0.0.0
|
||||
ip ospf network point-to-point
|
||||
|
||||
router ospf
|
||||
redistribute connected
|
||||
redistribute kernel
|
0
config/frr/staticd.conf
Normal file
0
config/frr/staticd.conf
Normal file
2
config/frr/zebra.conf
Normal file
2
config/frr/zebra.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
interface wg0
|
||||
ip address 192.168.0.2/24
|
10
config/wireguard/wg0.conf
Normal file
10
config/wireguard/wg0.conf
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Interface]
|
||||
Address = 192.168.0.2/24
|
||||
PrivateKey = +ExnETUyonPZX/8/yvhiVAlhLVDPIt9LoFCx+OCbPmY=
|
||||
ListenPort = 13231
|
||||
Table = off
|
||||
|
||||
[Peer]
|
||||
PublicKey = XnjYy1wiQrdEK6/uR45RTxmJ5/U7a8RCvlD/XfcmETU=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = 10.40.0.114:13231
|
17
docker-compose.yaml
Normal file
17
docker-compose.yaml
Normal file
|
@ -0,0 +1,17 @@
|
|||
version: "3.9"
|
||||
|
||||
services:
|
||||
backbone:
|
||||
build: .
|
||||
container_name: backbone
|
||||
ports:
|
||||
- 13231:13231/udp
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- CAP_SYS_ADMIN
|
||||
sysctls:
|
||||
- net.ipv4.conf.all.src_valid_mark=1
|
||||
- net.ipv4.ip_forward=1
|
||||
volumes:
|
||||
- ./config/frr:/etc/frr
|
||||
- ./config/wireguard:/etc/wireguard
|
5
docker-entrypoint.sh
Executable file
5
docker-entrypoint.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
wg-quick up wg0
|
||||
|
||||
/usr/lib/frr/watchfrr -F traditional zebra ospfd
|
Loading…
Reference in New Issue
Block a user