Go to file
2023-12-30 15:25:24 -05:00
bin refactor 2023-12-30 15:23:30 -05:00
deployments refactor 2023-12-30 15:23:30 -05:00
lib refactor 2023-12-30 15:23:30 -05:00
Dockerfile refactor 2023-12-30 15:23:30 -05:00
LICENSE forgot license 2023-12-30 15:25:24 -05:00
Makefile refactor 2023-12-30 15:23:30 -05:00
README.md refactor 2023-12-30 15:23:30 -05:00


peer multiple ospf nodes over wireguard to make an internal network



version: "3"
    image: g.freya.cat/freya/freyanet
    network_mode: host # needed otherwise internal network wont be accessable
    privileged: true
      - ./inet2.conf:/etc/inet2.conf


run the following commands with the provided makefile

$ make
$ make <os>

the current supported os's are: alpine

start the inet2 service to start freyanet


  • if running in docker mount a file called inet2.conf at /etc/inet2.conf
  • if running on host make a file called /etc/inet2.conf
# specify router id for ospf

# optionally assign static addresses to the loopback interface

# specify routed subnets
# ips that are not in these subnets will be ignored
# put the ip blocks for your entire internal network
Subnet fd:cafe::/32

# specify node stubnets
# ip blocks that this node is gurenteed to route
Stubnet fd:cafe:dead::/48

# optional global private key gets used for all interfaces
PrivateKey = {host private key}

# create a peered wireguard interface
# specify addresses, routes, ports, pre/post commands, and peers
# keys can be generated with wg genkey and wg pubkey
interface interfacename
    # indentation is a single tab per level
    # otherwise file will fail to parse

    # set the address(es) to assign to the interface
    # route lines are usually the same as Address but with host bits zeroed
    Route     # must specify route
    # you can also set ipv6 
    Address fd:cafe::ffff/64
    Address fd:cafe::/64
    # link local is also possible (and prefered for peering routers)
    # link-local addresses should *not* have an associated Route line
    Address fe80::1/64
    # more syntax options
    Route via
    Route default via
    # port to listen on in the host's network namespace, over udp
    # you probably have to allow this through your firewall
    ListenPort {host port}
    # omit if using global private key
    PrivateKey {host private key}
    # all optional
    PreUp command
    PostUp command
    PreDown command
    PostDown command
    # if running ospf on this interface
    # if running ospf on this interface and it's a stub network (no other routers)
    OSPF stub
    peer peername
        PublicKey {peer public key}
        # if the peer is a router, it has to have AllowedIPs set to everything and be the only
        # peer on the interface
        AllowedIPs, ::/0
        # either:
        Domain = {domain name of peer}
        Port = {peer port}
        # or:
        Endpoint = {peer ip}:{peer port}
        # make domain enpoint resolve with ipv (ipv6 is default)
        # optional
        PersistentKeepalive = 25


License Author Project
MIT tint inet2
MIT freya freyanet