Commit c024c36579c37d6412187cdff9fbcf6bd2e02b4a

Authored by Sergio Oliveira
1 parent 923258f9

Config ip_forward

cookbooks/reverse_proxy/files/ip_forward.conf 0 → 100644
@@ -0,0 +1 @@ @@ -0,0 +1 @@
  1 +net.ipv4.ip_forward = 1
cookbooks/reverse_proxy/recipes/default.rb
@@ -7,6 +7,14 @@ cookbook_file "/etc/nginx/#{node['config']['external_hostname']}.crt" do @@ -7,6 +7,14 @@ cookbook_file "/etc/nginx/#{node['config']['external_hostname']}.crt" do
7 notifies :restart, 'service[nginx]' 7 notifies :restart, 'service[nginx]'
8 end 8 end
9 9
  10 +cookbook_file "/etc/sysctl.d/ip_forward.conf" do
  11 + owner 'root'
  12 + group 'root'
  13 + mode 0644
  14 +end
  15 +
  16 +execute 'sysctl -w net.ipv4.ip_forward=1'
  17 +
10 cookbook_file "/etc/nginx/#{node['config']['external_hostname']}.key" do 18 cookbook_file "/etc/nginx/#{node['config']['external_hostname']}.key" do
11 owner 'root' 19 owner 'root'
12 group 'root' 20 group 'root'