diff options
Diffstat (limited to 'net-firewall/sanewall')
-rw-r--r-- | net-firewall/sanewall/Manifest | 7 | ||||
-rw-r--r-- | net-firewall/sanewall/files/sanewall.confd | 5 | ||||
-rw-r--r-- | net-firewall/sanewall/files/sanewall.initd | 56 | ||||
-rw-r--r-- | net-firewall/sanewall/metadata.xml | 5 | ||||
-rw-r--r-- | net-firewall/sanewall/sanewall-1.1.6-r2.ebuild | 56 |
5 files changed, 129 insertions, 0 deletions
diff --git a/net-firewall/sanewall/Manifest b/net-firewall/sanewall/Manifest new file mode 100644 index 000000000000..2e6d2dda21e7 --- /dev/null +++ b/net-firewall/sanewall/Manifest @@ -0,0 +1,7 @@ +AUX sanewall.confd 120 SHA256 b489da8c9a2254956191429aec83cfda2a33ca6624e3fe7f41ca38fbd6d67bd8 SHA512 5b8468d6e167ab00e37481618650f4844cb186465097a3cbca8a462940f324d50447d464d8db58666c77909231c3d664022bd7979501d3496ad627bf726cfa7e WHIRLPOOL f50ed841d8bf38ce0d81a413103a9934eb2ba8281c6902e4a37e93cd891dfb2f067e2ffdd903541d9d3a17c34a553094dc47eb3d0b4809c51c46bc14fe4a6146 +AUX sanewall.initd 1051 SHA256 4c7c5f4c0495014639ed26ca93c7cf63efc42af6857dbb22140fb033ea7094f7 SHA512 2272e7ee2a7d2c0bf97d1fdfb0cfd2b271626d8934545fca20c1c3757b4b90f5f715417c0e2d48e900a12a4d72a5fb0005294ef753b3c1b1ed8d5f217da7f571 WHIRLPOOL a32eb4009aa6eada5f1099b11ad61ece16b99a311364997149f06484d0f932fe71231371c6e287766a49fe0f341dd156a58e739a1202e5461812d1de6a2bd242 +DIST sanewall-1.1.6.tar.xz 585316 SHA256 c26a339a1ac945aa0ddffbbb92ac4dff07302da8d9de6983832e91e123c4b00e SHA512 73260197b88816e90b15fc244a5940c290ec99c82eb8e50338b4f0f88710900c8cd18920c6f319205e527859c0696da28798428ab04b03c7f355c1d8ba6f7ca0 WHIRLPOOL cf906c539c4d348837fc93e46e7cf3d1d94cadcd111db918c265fa78133b35befd69ea2bdef782a054b035f40130821291b11965c7846220eaf4551237bcfb78 +EBUILD sanewall-1.1.6-r2.ebuild 1495 SHA256 98f1df3a3689021135167c005f148b54f47bc2e8ada6a7c00bcd2cbbccfe01eb SHA512 41faef759794c9cbdce600d70e611ee0edf510d2d9f3604bb55849e702b19085a10f7c8d05a8636f19a0c4ba21004c77c968790556a4687b39129ffeeb5aed7d WHIRLPOOL 4745dcbdf1350c8ca2ff51aa09b9c0ca5381dcc0230e50b9886d8ebe5aea0896d901b831e5cf92c96225fd5536e95c74d39f95b17fb4032f0fdf3883209a2d81 +MISC ChangeLog 3395 SHA256 46e183d6124ec933289eeec5783fa39ae239dcdea95a51014df2f93c9323348e SHA512 02afec425c31557a492a1a28f91e0a07b983e75af2231133082fe411ea50f09a61bcd84ee437a944ee665b946708b991e63b1d5dec5909f8fafd48c3a6e59d95 WHIRLPOOL e86e65d89710ee177f12a3b61b4a4a2f24eb1da8ad6ee649f87f608d51d151e3bee05d7802d8fb113cdf4188b514ecb2a62b7c7fbd57bed9cb5e9078696f959b +MISC ChangeLog-2015 1291 SHA256 894e6aed9b6ac605aa86990a79836cbd7822bc696b01b93fd0374f2400e28027 SHA512 0251984de693d86f16363aba0927fbfafb6131ee2d1d039d30816873031d3aad8ab88c38338fcc919c343b3c2b42dbf79bcaf9eb878aec30c769fdf8bdad57b1 WHIRLPOOL 23f652748328d6eb34a72428a7c87c4af893458a5209e0e74410749a439ce34110593a21c4d6c7648b237e86dc029564d74e4c1bb4ca7d113787f9287b113eca +MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968 diff --git a/net-firewall/sanewall/files/sanewall.confd b/net-firewall/sanewall/files/sanewall.confd new file mode 100644 index 000000000000..2193b04d49bf --- /dev/null +++ b/net-firewall/sanewall/files/sanewall.confd @@ -0,0 +1,5 @@ +# location of sanewall config +SANEWALL_CONFIG="/etc/sanewall/sanewall.conf" + +# arguments for sanewall +#SANEWALL_OPTS="" diff --git a/net-firewall/sanewall/files/sanewall.initd b/net-firewall/sanewall/files/sanewall.initd new file mode 100644 index 000000000000..c13d2df106ad --- /dev/null +++ b/net-firewall/sanewall/files/sanewall.initd @@ -0,0 +1,56 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="save panic try" +extra_started_commands="reload" + +depend() { + need localmount + after bootmisc + before net + provide firewall +} + +start_pre() { + if [ ! -f ${SANEWALL_CONFIG} ]; then + eerror "Not starting sanewall, missing config file ${SANEWALL_CONFIG}." + return 1 + fi +} + +start() { + ebegin "Starting sanewall" + /usr/sbin/sanewall ${SANEWALL_OPTS} ${SANEWALL_CONFIG} start >/dev/null + eend $? +} + +stop() { + ebegin "Stopping sanewall" + /usr/sbin/sanewall ${SANEWALL_OPTS} stop >/dev/null + eend $? +} + +try() { + ebegin "Trying sanewall configuration" + /usr/sbin/sanewall ${SANEWALL_OPTS} ${SANEWALL_CONFIG} try + eend $? +} + +status() { + ebegin "Showing sanewall status" + /usr/sbin/sanewall ${SANEWALL_OPTS} status + eend $? +} + +panic() { + ebegin "sanewall panic" + /usr/sbin/sanewall ${SANEWALL_OPTS} panic + eend $? +} + +save() { + ebegin "Saving sanewall configuration" + /usr/sbin/sanewall ${SANEWALL_OPTS} save + eend $? +} diff --git a/net-firewall/sanewall/metadata.xml b/net-firewall/sanewall/metadata.xml new file mode 100644 index 000000000000..6f49eba8f496 --- /dev/null +++ b/net-firewall/sanewall/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> +</pkgmetadata> diff --git a/net-firewall/sanewall/sanewall-1.1.6-r2.ebuild b/net-firewall/sanewall/sanewall-1.1.6-r2.ebuild new file mode 100644 index 000000000000..c9997782098b --- /dev/null +++ b/net-firewall/sanewall/sanewall-1.1.6-r2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit linux-info + +DESCRIPTION="iptables firewall generator (fork of firehol)" +HOMEPAGE="http://www.sanewall.org/" +SRC_URI="http://download.sanewall.org/releases/${PV}/${P}.tar.xz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="app-arch/xz-utils" +RDEPEND="net-firewall/iptables[ipv6] + sys-apps/iproute2[-minimal] + virtual/modutils + || ( + net-misc/wget + net-misc/curl + )" + +pkg_setup() { + local KCONFIG_OPTS="~NF_CONNTRACK_IPV4 ~NF_CONNTRACK_MARK ~NF_NAT ~NF_NAT_FTP ~NF_NAT_IRC \ + ~IP_NF_IPTABLES ~IP_NF_FILTER ~IP_NF_TARGET_REJECT ~IP_NF_TARGET_LOG ~IP_NF_TARGET_ULOG \ + ~IP_NF_TARGET_MASQUERADE ~IP_NF_TARGET_REDIRECT ~IP_NF_MANGLE \ + ~NETFILTER_XT_MATCH_LIMIT ~NETFILTER_XT_MATCH_STATE ~NETFILTER_XT_MATCH_OWNER" + + get_version + if [[ ${KV_PATCH} -ge 25 ]] ; then + CONFIG_CHECK="~NF_CONNTRACK ${KCONFIG_OPTS}" + else + CONFIG_CHECK="~NF_CONNTRACK_ENABLED ${KCONFIG_OPTS}" + fi + linux-info_pkg_setup +} + +src_configure() { + econf --docdir="/usr/share/doc/${PF}" +} + +src_install() { + default + newconfd "${FILESDIR}"/${PN}.confd ${PN} + newinitd "${FILESDIR}"/${PN}.initd ${PN} +} + +pkg_postinst() { + # install default configuration if it doesn't exist + if [[ ! -e "${ROOT}"/etc/${PN}/${PN}.conf ]] ; then + einfo "Installing a sample configuration to ${ROOT}/etc/${PN}/${PN}.conf" + cp "${ROOT}"/etc/${PN}/${PN}.conf.example "${ROOT}"/etc/${PN}/${PN}.conf || die + fi +} |