end
end
+file "/etc/shorewall/masq" do
+ action :delete
+end
+
+file "/etc/shorewall/masq.bak" do
+ action :delete
+end
+
if node[:roles].include?("gateway")
- template "/etc/shorewall/masq" do
- source "shorewall-masq.erb"
+ template "/etc/shorewall/snat" do
+ source "shorewall-snat.erb"
owner "root"
group "root"
mode "644"
notifies :restart, "service[shorewall]"
end
else
- file "/etc/shorewall/masq" do
+ file "/etc/shorewall/snat" do
action :delete
notifies :restart, "service[shorewall]"
end
+++ /dev/null
-# DO NOT EDIT - This file is being maintained by Chef
-
-# INTERFACE SOURCE ADDRESS
-<% node.interfaces(:role => :external).each do |external| -%>
-<% node.interfaces(:role => :internal).each do |internal| -%>
-<%= external[:interface] %> <%= internal[:network] %>/<%= internal[:prefix] %> detect
-<% end -%>
-<% end -%>
--- /dev/null
+# DO NOT EDIT - This file is being maintained by Chef
+
+# ACTION SOURCE DEST PROTO PORT IPSEC MARK USER SWITCH ORIGDEST PROBABILITY
+<% node.interfaces(:role => :external).each do |external| -%>
+<% node.interfaces(:role => :internal).each do |internal| -%>
+SNAT(detect) <%= internal[:network] %>/<%= internal[:prefix] %> <%= external[:interface] %>
+<% end -%>
+<% end -%>