Fix ipv6 address string

This commit is contained in:
Jamil Bou Kheir
2021-09-23 06:24:21 +00:00
parent 015b2d1d15
commit 021695151e
2 changed files with 15 additions and 9 deletions

View File

@@ -1,3 +1,8 @@
# We're running on a self-hosted runner, so only allow one workflow to run at a
# time.
# XXX: Remove this when self-hosted ephemeral runners are implmented.
concurrency: ci
name: CI
on:
- push

View File

@@ -44,17 +44,14 @@ if wg_exists.status.exitstatus == 1
end
end
ifconfig '10.3.2.1/24' do
family 'inet'
device wg_interface
mtu '1420'
execute 'wireguard_ipv4' do
addr = '10.3.2.1/24'
command "ip address replace #{addr} dev #{wg_interface}"
end
# XXX: Make this configurable
ifconfig 'fd00:3:2::1/120' do
family 'inet6'
device wg_interface
mtu '1420'
execute 'wireguard_ipv6' do
addr = 'fd00:3:2::1/120'
command "ip -6 address replace #{addr} dev #{wg_interface}"
end
execute 'set_wireguard_interface_private_key' do
@@ -75,6 +72,10 @@ route 'fd00:3:2::0/120' do
device wg_interface
end
execute 'set_mtu' do
command "ip link set mtu 1420 up dev #{wg_interface}"
end
replace_or_add "IPv4 packet forwarding" do
path "/etc/sysctl.conf"
pattern "^#net.ipv4.ip_forward=1"