Current File : //sbin/iptables-apply
#!/bin/bash
#
# iptables-apply -- a safer way to update iptables remotely
#
# Copyright © Martin F. Krafft <[email protected]>
# Released under the terms of the Artistic Licence 2.0
#
set -eu

PROGNAME="${0##*/}";
VERSION=1.0

TIMEOUT=10

function blurb()
{
	cat <<-_eof
	$PROGNAME $VERSION -- a safer way to update iptables remotely
	_eof
}

function copyright()
{
	cat <<-_eof
	$PROGNAME is C Martin F. Krafft <[email protected]>.

	The program has been published under the terms of the Artistic Licence 2.0
	_eof
}

function about()
{
	blurb
	echo
	copyright
}

function usage()
{
	cat <<-_eof
	Usage: $PROGNAME [options] ruleset

	The script will try to apply a new ruleset (as output by iptables-save/read
	by iptables-restore) to iptables, then prompt the user whether the changes
	are okay. If the new ruleset cut the existing connection, the user will not
	be able to answer affirmatively. In this case, the script rolls back to the
	previous ruleset.

	The following options may be specified, using standard conventions:

	-t | --timeout	Specify the timeout in seconds (default: $TIMEOUT)
	-V | --version	Display version information
	-h | --help	Display this help text
	_eof
}

SHORTOPTS="t:Vh";
LONGOPTS="timeout:,version,help";

OPTS=$(getopt -s bash -o "$SHORTOPTS" -l "$LONGOPTS" -n "$PROGNAME" -- "$@") || exit $?
for opt in $OPTS; do
	case "$opt" in
		(-*) unset OPT_STATE;;
		(*)
			case "${OPT_STATE:-}" in
				(SET_TIMEOUT)
					eval TIMEOUT=$opt
					case "$TIMEOUT" in
						([0-9]*) :;;
						(*)
							echo "E: non-numeric timeout value." >&2
							exit 1
							;;
					esac
					;;
			esac
			;;
	esac

	case "$opt" in
		(-h|--help) usage >&2; exit 0;;
		(-V|--version) about >&2; exit 0;;
		(-t|--timeout) OPT_STATE=SET_TIMEOUT;;
		(--) break;;
	esac
	shift
done

case "$PROGNAME" in
	(*6*)
		SAVE=ip6tables-save
		RESTORE=ip6tables-restore
		DEFAULT_FILE=/etc/network/ip6tables
		;;
	(*)
		SAVE=iptables-save
		RESTORE=iptables-restore
		DEFAULT_FILE=/etc/network/iptables
		;;
esac

FILE="${1:-$DEFAULT_FILE}";

if [[ -z "$FILE" ]]; then
	echo "E: missing file argument." >&2
	exit 1
fi

if [[ ! -r "$FILE" ]]; then
	echo "E: cannot read $FILE" >&2
	exit 2
fi

COMMANDS=(mktemp "$SAVE" "$RESTORE")

for cmd in "${COMMANDS[@]}"; do
	if ! command -v $cmd >/dev/null; then
		echo "E: command not found: $cmd" >&2
		exit 127
	fi
done

umask 0700

TMPFILE=$(mktemp)
trap "rm -f $TMPFILE" EXIT HUP INT QUIT ILL TRAP ABRT BUS \
		      FPE USR1 SEGV USR2 PIPE ALRM TERM

if ! "$SAVE" >"$TMPFILE"; then
	if ! grep -q ipt /proc/modules 2>/dev/null; then
		echo "E: iptables support lacking from the kernel." >&2
		exit 3
	else
		echo "E: unknown error saving current iptables ruleset." >&2
		exit 4
	fi
fi

[ -x /etc/init.d/fail2ban ] && /etc/init.d/fail2ban stop

echo -n "Applying new ruleset... "
if ! "$RESTORE" <"$FILE"; then
	echo "failed."
	echo "E: unknown error applying new iptables ruleset." >&2
	exit 5
else
	echo "done."
fi

echo -n "Can you establish NEW connections to the machine? (y/N) "

read -n1 -t "${TIMEOUT:-15}" ret 2>&1 || :
case "${ret:-}" in
	(y*|Y*)
		echo
		echo "... then my job is done. See you next time."
		;;
	(*)
		if [[ -z "${ret:-}" ]]; then
			echo "apparently not..."
		else
			echo
		fi
		echo "Timeout. Something happened (or did not). Better play it safe..."
		echo -n "Reverting to old ruleset... "
		"$RESTORE" <"$TMPFILE";
		echo "done."
		exit 255
		;;
esac

[ -x /etc/init.d/fail2ban ] && /etc/init.d/fail2ban start

exit 0

# vim:noet:sw=8
No se encontró la página – Alquiler de Limusinas, Autos Clásicos y Microbuses

Alquiler de Autos Clásicos para Sesiones Fotográficas: Estilo y Elegancia en Cada Toma

Si buscas darle un toque auténtico, elegante o retro a tus fotos, el alquiler de autos clásicos para sesiones fotográficas es la opción ideal. Este tipo de vehículos no solo son íconos del diseño automotriz, sino que se convierten en un elemento visual impactante que transforma cualquier sesión en una experiencia única.


¿Por Qué Usar Autos Clásicos en Sesiones Fotográficas?

1. Estética Visual Única

Un auto clásico aporta personalidad, historia y carácter a tus imágenes. Desde tomas urbanas hasta escenarios naturales, estos vehículos se adaptan a diferentes estilos visuales.

2. Ideal para Diversos Usos

  • Sesiones de boda y pre-boda
  • Campañas publicitarias
  • Editoriales de moda
  • Proyectos cinematográficos
  • Contenido para redes sociales

3. Variedad de Modelos

Desde convertibles vintage hasta muscle cars de los años 60 y 70, puedes elegir el modelo que mejor se ajuste a la estética de tu sesión.


Beneficios del Alquiler Profesional

  • Vehículos en excelente estado estético y mecánico
  • Choferes disponibles si se requiere movilidad
  • Asesoría para elegir el modelo adecuado
  • Posibilidad de ambientación adicional (flores, letreros, decoración retro)

Conclusión: Captura Momentos con Estilo

Un auto clásico puede transformar tu sesión fotográfica en una obra de arte visual. No importa el propósito: el estilo, la elegancia y el impacto están garantizados.


📸 ¡Reserva tu auto clásico y crea fotos memorables!

Consulta disponibilidad y haz de tu sesión algo realmente especial. ¡Llama la atención con cada toma!

Not Found

404

Sorry, the page you’re looking for doesn’t exist.