No description
Find a file
2023-06-15 13:51:32 +02:00
gre-on-wg.sh Add pssibility of delay between ip commands. 2023-06-15 13:35:30 +02:00
gre-on-wg.target Add unit files. 2023-06-15 01:57:56 +02:00
gre-on-wg@.service Add reload command. 2023-06-15 13:51:32 +02:00
Makefile Create config directory when installing. 2023-06-15 02:36:11 +02:00
README.md Initial commit. 2023-06-15 01:05:12 +02:00

gre-on-wg

Create a GRETAP mesh network on top of wireguard.

Usage

gre-on-wg WG_QUICK_CONFIG_FILE ADDRESS_TRANSLATIONS

The first argument is the path to a wg-quick config file, while the second argument provides address translations for wireguard internal ip addresses to the new addresses.

The wireguard configuration must have the Address config in the [Interface] section set to exactly one address, similarly every [Peer] section may only contain one AllowedIPs entry with one addresss.

The translation file should contain lines of the following format: <wireguard private ip> <space> <new bridge network ip>

Example

Consider the following wg0.conf file

[Interface]
Address = 192.168.3.100/24

[Peer]
AllowedIPs = 192.168.3.101/32

[Peer]
AllowedIPs = 192.168.3.102/32

[Peer]
AllowedIPs = 192.168.3.103/32

And the following translation file

192.168.3.100/24 192.168.4.100/24
192.168.3.101/24 192.168.4.101/24
192.168.3.102/24 192.168.4.102/24
192.168.3.103/24 192.168.4.103/24

This would result in the creation of the bridge network wg0br1 on host 192.168.3.100 where the different peers have the addresses 192.168.4.10[0123]. Additionally the point-to-point networks wg0gre[1234] would be created.