diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-08-02 19:14:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-08-02 19:14:55 +0100 |
commit | b24bd25253fe093f722ab576d29fdc41d04cb1ee (patch) | |
tree | 0fcf2afd9f852c4d4c291cf8afaa2c244d598105 /net-firewall/iptables | |
parent | 121ed4eec41fbf03e1998d09eede1bf449da63b9 (diff) |
gentoo resync : 02.08.2019
Diffstat (limited to 'net-firewall/iptables')
-rw-r--r-- | net-firewall/iptables/Manifest | 1 | ||||
-rw-r--r-- | net-firewall/iptables/files/iptables-1.4.13-r1.init | 129 |
2 files changed, 0 insertions, 130 deletions
diff --git a/net-firewall/iptables/Manifest b/net-firewall/iptables/Manifest index 6834a240df2f..917e3dcdcd98 100644 --- a/net-firewall/iptables/Manifest +++ b/net-firewall/iptables/Manifest @@ -1,6 +1,5 @@ AUX ip6tables-1.4.13.confd 690 BLAKE2B 457beb9caaef166b8d98bddfd3e9f2799439bdfef4dd4acf4e5b7d619ac23b0d2c9f7ad62ab8fe70cb0970b378fbc4b179336c399a078babb2647cb127631b2e SHA512 8de9a5de4061bef217fbc07577688a8110f1116af7f3b936dfd18100a6a7a47ec6e70c456b24cf3432fb4f2034b741a487fe6af8d9740f174d51c6eb16945c6e AUX ip6tables-r1.confd 899 BLAKE2B d8c72df359a35798d7a92958ba9a620ab580427a06765850928181d7b4cc25455c586daaad88bd20e61a9c9218dbc0895de38b006526bb04f4f2e998d8062fbe SHA512 553ddf83558edaccf891a366175e47aad950853be0de556581cfa08f614afa1f4139c94b8d8d2884ed69018513edeb966331d4d6a615829ada65fac2066840e5 -AUX iptables-1.4.13-r1.init 2766 BLAKE2B 1941ba5383055bfedd57b8eb6a390cab5fc3438bcf9f2b03a31f7a417ac7c2abaa590d23a8ae4500595c9bbb83da852e27d71f672a2758fe0be45691a461105c SHA512 9b74344043f48ce2a4691f09199cfa752bd7ee360d912d412fe1cf51de54821b0d082c9585a11b84020454f9759af78ff097d7dfc8f5148ef9e987e6d990edde AUX iptables-1.4.13.confd 687 BLAKE2B 78b2242454b5f3228661f1e41b790aaa458c1225162a222da5a309a15eca56a531c756a5ceb49e506095461998305189efe136fde0bfe5916cc2d00661de1789 SHA512 bd67d53e997ea65755148ba071fe6e3856d6e604b9167c666900721bc3dc24f63d395bc33a1a34ae50f95e72760da630db1a8d35afc81ec5973e60ba5343dc70 AUX iptables-r1.confd 890 BLAKE2B 0aaca870e3c03f19a71cf1b210377dfda320faf118359e298bef419eaf280fd11c9726d200ae89602e863c9b48de0bb51ac05424b50c064afe948a980e300153 SHA512 10002da01ded6be0e9bca6041798ad0859fa2212fde077a048443e4f3012c95d86e4580ae426e87af5891368062af9af6f9fd35ed617d24cdd3c51702b816b13 AUX iptables-r2.init 4384 BLAKE2B d11be1725e25d234e01af86c82d3745fd630b15b3ae2228845c5555db5c2ffdcd920fd565480f76ab91ef2d5b26f9ae96432efc288a1b9aa2abfb5b9bb01d7bf SHA512 8897ab985424c895e261e0fe521921f0da8e09e38394655b0f91c65c0e8f603731faf70489f7a6610c83d6c2fde75f92f309405d72277643165a847e62238df7 diff --git a/net-firewall/iptables/files/iptables-1.4.13-r1.init b/net-firewall/iptables/files/iptables-1.4.13-r1.init deleted file mode 100644 index b410b4ff52bf..000000000000 --- a/net-firewall/iptables/files/iptables-1.4.13-r1.init +++ /dev/null @@ -1,129 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -extra_commands="check save panic" -extra_started_commands="reload" - -iptables_name=${SVCNAME} -case ${iptables_name} in -iptables|ip6tables) ;; -*) iptables_name="iptables" ;; -esac - -iptables_bin="/sbin/${iptables_name}" -case ${iptables_name} in - iptables) iptables_proc="/proc/net/ip_tables_names" - iptables_save=${IPTABLES_SAVE};; - ip6tables) iptables_proc="/proc/net/ip6_tables_names" - iptables_save=${IP6TABLES_SAVE};; -esac - -depend() { - need localmount #434774 - before net -} - -set_table_policy() { - local chains table=$1 policy=$2 - case ${table} in - nat) chains="PREROUTING POSTROUTING OUTPUT";; - mangle) chains="PREROUTING INPUT FORWARD OUTPUT POSTROUTING";; - filter) chains="INPUT FORWARD OUTPUT";; - *) chains="";; - esac - local chain - for chain in ${chains} ; do - ${iptables_bin} -t ${table} -P ${chain} ${policy} - done -} - -checkkernel() { - if [ ! -e ${iptables_proc} ] ; then - eerror "Your kernel lacks ${iptables_name} support, please load" - eerror "appropriate modules and try again." - return 1 - fi - return 0 -} -checkconfig() { - if [ ! -f ${iptables_save} ] ; then - eerror "Not starting ${iptables_name}. First create some rules then run:" - eerror "/etc/init.d/${iptables_name} save" - return 1 - fi - return 0 -} - -start() { - checkconfig || return 1 - ebegin "Loading ${iptables_name} state and starting firewall" - ${iptables_bin}-restore ${SAVE_RESTORE_OPTIONS} < "${iptables_save}" - eend $? -} - -stop() { - if [ "${SAVE_ON_STOP}" = "yes" ] ; then - save || return 1 - fi - checkkernel || return 1 - ebegin "Stopping firewall" - local a - for a in $(cat ${iptables_proc}) ; do - set_table_policy $a ACCEPT - - ${iptables_bin} -F -t $a - ${iptables_bin} -X -t $a - done - eend $? -} - -reload() { - checkkernel || return 1 - checkrules || return 1 - ebegin "Flushing firewall" - local a - for a in $(cat ${iptables_proc}) ; do - ${iptables_bin} -F -t $a - ${iptables_bin} -X -t $a - done - eend $? - - start -} - -checkrules() { - ebegin "Checking rules" - ${iptables_bin}-restore --test ${SAVE_RESTORE_OPTIONS} < "${iptables_save}" - eend $? -} - -check() { - # Short name for users of init.d script. - checkrules -} - -save() { - ebegin "Saving ${iptables_name} state" - checkpath -q -d "$(dirname "${iptables_save}")" - checkpath -q -m 0600 -f "${iptables_save}" - ${iptables_bin}-save ${SAVE_RESTORE_OPTIONS} > "${iptables_save}" - eend $? -} - -panic() { - checkkernel || return 1 - if service_started ${iptables_name}; then - rc-service ${iptables_name} stop - fi - - local a - ebegin "Dropping all packets" - for a in $(cat ${iptables_proc}) ; do - ${iptables_bin} -F -t $a - ${iptables_bin} -X -t $a - - set_table_policy $a DROP - done - eend $? -} |