HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/share/netfilter-persistent/plugins.d/25-ip6tables
#!/bin/sh

# This file is part of netfilter-persistent
# (was iptables-persistent)
# Copyright (C) 2009, Simon Richter <sjr@debian.org>
# Copyright (C) 2010, 2014 Jonathan Wiltshire <jmw@debian.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.

set -e

rc=0

load_rules()
{
	#load IPv6 rules
	if [ ! -f /etc/iptables/rules.v6 ]; then
		echo "Warning: skipping IPv6 (no rules to load)"
	else
		/sbin/ip6tables-restore < /etc/iptables/rules.v6 2> /dev/null
		if [ $? -ne 0 ]; then
			rc=1
		fi
	fi
}

save_rules()
{
	#save IPv6 rules
	#need at least ip6table_filter loaded:
	/sbin/modprobe -q ip6table_filter || true
	if [ ! -f /proc/net/ip6_tables_names ]; then
		log_action_cont_msg "Warning: skipping IPv6 (no modules loaded)"
	elif [ -x /sbin/ip6tables-save ]; then
		touch /etc/iptables/rules.v6
		chmod 0640 /etc/iptables/rules.v6
		/sbin/ip6tables-save > /etc/iptables/rules.v6
		if [ $? -ne 0 ]; then
			rc=1
		fi
	fi
}

flush_rules()
{
	if [ ! -f /proc/net/ip6_tables_names ]; then
		echo "Warning: skipping IPv6 (no module loaded)"
	elif [ -x /sbin/ip6tables ]; then
		for chain in INPUT FORWARD OUTPUT
		do
			/sbin/ip6tables -P $chain ACCEPT
		done
		for param in F Z X; do /sbin/ip6tables -$param; done
		for table in $(cat /proc/net/ip6_tables_names)
		do
			/sbin/ip6tables -t $table -F
			/sbin/ip6tables -t $table -Z
			/sbin/ip6tables -t $table -X
		done
	fi
}

case "$1" in
start|restart|reload|force-reload)
	load_rules
	;;
save)
	save_rules
	;;
stop)
	# Why? because if stop is used, the firewall gets flushed for a variable
	# amount of time during package upgrades, leaving the machine vulnerable
	# It's also not always desirable to flush during purge
	echo "Automatic flushing disabled, use \"flush\" instead of \"stop\""
	;;
flush)
	flush_rules
	;;
*)
    echo "Usage: $0 {start|restart|reload|force-reload|save|flush}" >&2
    exit 1
    ;;
esac

exit $rc