Commit 923258f9902d59d70a32c903b5c655601907df9c

Authored by Sergio Oliveira
1 parent 279ab334

Added firewall template

cookbooks/reverse_proxy/recipes/default.rb
  1 +package 'iptables-services'
  2 +
1 3 cookbook_file "/etc/nginx/#{node['config']['external_hostname']}.crt" do
2 4 owner 'root'
3 5 group 'root'
... ...
cookbooks/reverse_proxy/templates/firewall.erb 0 → 100644
... ... @@ -0,0 +1,17 @@
  1 +# Generated by iptables-save v1.4.21 on Thu Apr 16 20:28:15 2015
  2 +*nat
  3 +:PREROUTING ACCEPT [5:493]
  4 +:INPUT ACCEPT [5:493]
  5 +:OUTPUT ACCEPT [2:138]
  6 +:POSTROUTING ACCEPT [2:138]
  7 +-A PREROUTING -d <%= node['peers']['reverseproxy'] %>/32 -p tcp -m tcp --dport 22 -j DNAT --to-destination <%= node['peers']['integration'] %>:22
  8 +-A POSTROUTING -d <%= node['peers']['reverseproxy'] %>/32 -p tcp -m tcp --dport 22 -j SNAT --to-source <%= node['peers']['integration'] %>
  9 +COMMIT
  10 +# Completed on Thu Apr 16 20:28:15 2015
  11 +# Generated by iptables-save v1.4.21 on Thu Apr 16 20:28:15 2015
  12 +*filter
  13 +:INPUT ACCEPT [5675:7406907]
  14 +:FORWARD ACCEPT [66:13348]
  15 +:OUTPUT ACCEPT [3901:279969]
  16 +COMMIT
  17 +# Completed on Thu Apr 16 20:28:15 2015
... ...