Skip to content

Commit e645fad

Browse files
authored
Merge pull request #8 from a-mcf/add-relay-support
Update to 1.6.1, add relay support
2 parents 1fc3f6c + f7e97fd commit e645fad

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ Role Variables
4040
| `local_range` | String | Local range is used to define a hint about the local network range | NA | No |
4141
| `sshd.enabled` | Boolean | sshd can expose informational and administrative functions via ssh | NA | No |
4242
| `sshd.listen` | String | IP / Port for admin SSH functions | NA | No |
43+
| `relay.relays` | List | IP of hosts to use as a relay | NA | No |
44+
| `relay.am_relay` | String | Indicate whether host should act as a relay | `false` | No |
45+
| `relay.use_relays` | String | Indicate whether host should attempt to connect through relays | `true` | No |
4346
| `metrics.prometheus` | Boolean | Enables prometheus server | NA | No |
4447
| `outbound` | List | Outbound rules for the built in firewall | `See Below` | Yes |
4548
| `inbound` | List | Inbound rules for the built in firewall | `See Below` | Yes |

defaults/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
# defaults file for .
3-
nebula_version: 1.5.0
3+
nebula_version: 1.6.1
44

55
# force overwrite
66
nebula_force_install: false
@@ -11,6 +11,10 @@ nebula_bin_directory: /bin
1111
# this will cause net.ipv4.ip_forward to be set to 1 to allow unsafe routes
1212
enable_ip_forward: false
1313

14+
relay:
15+
am_relay: "false"
16+
use_relays: "true"
17+
1418
tun:
1519
dev_name: nebula1
1620
drop_local_broadcast: false

templates/config.yaml.j2

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,25 @@ sshd:
7171
#- "ssh public key string"
7272
{% endif %}
7373

74+
{% if relay is defined %}
75+
# EXPERIMENTAL: relay support for networks that can't establish direct connections.
76+
relay:
77+
# Relays are a list of Nebula IP's that peers can use to relay packets to me.
78+
# IPs in this list must have am_relay set to true in their configs, otherwise
79+
# they will reject relay requests.
80+
{% if relay.relays is defined %}
81+
relays:
82+
{% for relay_host in relay.relays %}
83+
- {{ relay_host }}
84+
{% endfor %}
85+
{% endif %}
86+
# Set am_relay to true to permit other hosts to list my IP in their relays config. Default false.
87+
am_relay: {{ relay.am_relay | default("false") }}
88+
# Set use_relays to false to prevent this instance from attempting to establish connections through relays.
89+
# default true
90+
use_relays: {{ relay.use_relay | default("true") }}
91+
{% endif %}
92+
7493
# Configure the private interface. Note: addr is baked into the nebula certificate
7594
tun:
7695
# Name of the device

0 commit comments

Comments
 (0)