diff --git a/omnibus/cookbooks/firezone/recipes/network.rb b/omnibus/cookbooks/firezone/recipes/network.rb index 1ce67a6e7..cdd34eba2 100644 --- a/omnibus/cookbooks/firezone/recipes/network.rb +++ b/omnibus/cookbooks/firezone/recipes/network.rb @@ -30,13 +30,13 @@ node.default['firezone']['egress_interface'] = egress_interface replace_or_add "IPv4 packet forwarding" do path "/etc/sysctl.conf" - pattern "^#net.ipv4.ip_forward=1" + pattern /^\s+#\s+net.ipv4.ip_forward\s+=\s+1/ line "net.ipv4.ip_forward=1" end replace_or_add "IPv6 packet forwarding" do path "/etc/sysctl.conf" - pattern "^#net.ipv6.conf.all.forwarding=1" + pattern /^\s+#\s+net.ipv6.conf.all.forwarding\s+=\s+1/ line "net.ipv6.conf.all.forwarding=1" end