Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e2718873fe
Fetching contributors…

Cannot retrieve contributors at this time

file 26 lines (24 sloc) 0.716 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
package :iptables do
  description "Firewall"
  runner %{/etc/network/if-pre-up.d/iptables}
  requires :iptables_rules, :iptables_ifconfig
end

package :iptables_rules do
  description "Firewall rules"
  transfer "assets/iptables", "/tmp" do
    post :install, %{mv /tmp/iptables /etc/iptables.up.rules}
  end
  verify do
    has_file "/etc/iptables.up.rules"
  end
end

package :iptables_ifconfig do
  description "Setup firewall with network"
  transfer "assets/iptables_ifup", "/tmp" do
    post :install, %{mv /tmp/iptables_ifup /etc/network/if-pre-up.d/iptables}
    post :install, %{chmod +x /etc/network/if-pre-up.d/iptables}
  end
  verify do
    has_executable "/etc/network/if-pre-up.d/iptables"
  end
end
Something went wrong with that request. Please try again.