Avamar: Cómo agregar o eliminar reglas de firewall personalizadas de Avamar con edit-firewall-rules.sh (v7.3 en adelante)
Resumen: En este artículo, se describe cómo agregar o eliminar reglas de firewall personalizadas de Avamar mediante el script edit-firewall-rules.sh. Está disponible en Avamar v7.3 y versiones posteriores. ...
Este artículo se aplica a:
Este artículo no se aplica a:
Este artículo no está vinculado a ningún producto específico.
En este artículo no se identifican todas las versiones de los productos.
Instrucciones
En Avamar v7.3 y versiones posteriores, hay disponible una herramienta que permite a los usuarios agregar o eliminar sus propias reglas de iptables personalizadas.
Funciones:
edit-firewall-rules.sh:
Ejecute los scripts anteriores como usuario raíz.
Después de cargar las claves como usuario administrador, cambie al usuario raíz con "su - "
Ejecución del script:
Cargue las claves SSH antes de ejecutar el script.
Si las claves no se cargan, el script puede fallar cuando copia reglas a otros nodos.
Consulte las "notas" del artículo o la Guía de administración del sistema Avamar para obtener más información.
Formato:
IP de origen | Puerto de origen | IP de destino | Puerto de destino | Protocolo | Tipo ICMP | Destino | Cadena | Ejemplo de tipo
de nodo:
Funciones:
- Parte del RPM estándar de Avamar Firewall que se envía con v7.3.
- Los usuarios pueden agregar o eliminar sus propias reglas de iptables personalizadas.
- Las reglas personalizadas sobreviven a las actualizaciones de versiones de Avamar.
- Las reglas personalizadas sobreviven a las actualizaciones de paquetes de firewall.
- edit-firewall-rules.sh.
- manage-custom-rules.sh.
- avfwb_custom_config.txt.
edit-firewall-rules.sh:
- Este archivo es un script interactivo que toma la entrada del usuario y la formatea en formato iptables .
- Este archivo presenta la información de una manera fácil para el cliente.
- Este archivo es el motor detrás del script interactivo de edit-firewall-rules.sh .
- Este archivo crea las reglas y los comandos de iptables que se basan en el conjunto de reglas personalizadas guardadas en el archivo de configuración.
- Este archivo reinicia el servicio avfirewall para aplicar las reglas nuevas.
Ejecute los scripts anteriores como usuario raíz.
Después de cargar las claves como usuario administrador, cambie al usuario raíz con "su - "
Ejecución del script:
Cargue las claves SSH antes de ejecutar el script.
Si las claves no se cargan, el script puede fallar cuando copia reglas a otros nodos.
Consulte las "notas" del artículo o la Guía de administración del sistema Avamar para obtener más información.
Choose an Action ---------------- 1) Add a custom rule 2) Remove a custom rule 3) List Current Custom Rules 4) Exit 5) Save & Exit Enter desired action: Add a Custom Rule The user can make selections for iptables fields to construct the rule they wish to add.
- Tipo de regla: IPv4 o IPv6.
- Cadena: Salida, Entrada, Logdrop o Reenvío.
- Protocol: TCP, UDP, ICMP.
- IP de origen.
- Puerto de origen.
- IP de destino.
- Puerto de destino.
- Destino: Aceptar, rechazar, descartar, rechazar.
- Tipo de nodo: Todos, datos, utilidad.
Formato:
IP de origen | Puerto de origen | IP de destino | Puerto de destino | Protocolo | Tipo ICMP | Destino | Cadena | Ejemplo de tipo
de nodo:
10.10.10.10||10.10.10.11||tcp||ACCEPT|OUTPUT|ALL Add Rule Example Select the type of firewall rule to add
Firewall Rule Types ------------------- 1) IPv4 Rule 2) IPv6 Rule Enter Firewall Rule Type:
Protocol -------- 1) TCP 2) UDP 3) ICMP Enter Protocol: Select the desired CHAIN
Firewall Chains --------------- 1) OUTPUT 2) INPUT 3) LOGDROP 4) FORWARD Select Chain: Select the Protocol type to be used
Protocol -------- 1) TCP 2) UDP 3) ICMP Enter Protocol: Enter source IP (leave blank for none): Enter source port (leave blank for none): Enter destination IP (leave blank for none): Enter destination port (leave blank for none): Select the desired target action
Targets ------- 1) ACCEPT 2) REJECT 3) DROP 4) LOGDROP Select Target: Select which type of node this new rule will be applied to
Node Types ---------- 1) ALL 2) DATA 3) UTILITY Select node type to apply rule to: The script will ask you to confirm that you want to add the new rule to the avfwb_custom_config.txt file
Add rule ||||tcp||ACCEPT|OUTPUT|ALL to file? (Y/N): y Adding ||||tcp||ACCEPT|OUTPUT|ALL to file... The script asks if you wish to add another rule or return to the main menu
Add another rule? (Y/N): Return to main menu? (Y/N): Saving and applying rules
Choose an Action ---------------- 1) Add a custom rule 2) Remove a custom rule 3) List Current Custom Rules 4) Exit 5) Save & Exit Enter desired action: 5 Rules have been saved to /usr/local/avamar/lib/admin/security/avfwb_custom_config.txt Save and execute rules now? (Y/N): Choosing Y when asked to save and execute will propagate the config file to all nodes, applies the rules accordingly and restarts the avfirewall service.Removing a rule
Choose an Action ---------------- 1) Add a custom rule 2) Remove a custom rule 3) List Current Custom Rules 4) Exit 5) Save & Exit Enter desired action: 2Select the rule to remove. The script will confirm "Line xxx has been removed from configuration file" Return to the main menu. If we select option 3 "List Current Custom Rules" we will see the list of rules and a list of 'Changes Pending'.
Pending changes will be executed when exiting the script and selecting Y to "Save and execute rules now".
Rules have been saved to /usr/local/avamar/lib/admin/security/avfwb_custom_config.txt Save and execute rules now? (Y/N):
Información adicional
Tenga cuidado de no crear reglas de firewall que puedan afectar la funcionalidad de la aplicación Avamar. Por ejemplo, rechazar el tráfico hacia o desde un puerto de Avamar Server.
Consulte la versión más reciente de la Guía de seguridad del producto Avamar para obtener información sobre los puertos necesarios de Avamar.
La Guía de seguridad del producto también tiene una herramienta similar "manage-custom-rules.sh" que no es interactiva.
Cómo comprobar si las claves SSH están cargadas y, si no es así, cómo cargarlas.
Consulte la versión más reciente de la Guía de seguridad del producto Avamar para obtener información sobre los puertos necesarios de Avamar.
La Guía de seguridad del producto también tiene una herramienta similar "manage-custom-rules.sh" que no es interactiva.
Cómo comprobar si las claves SSH están cargadas y, si no es así, cómo cargarlas.
admin@util:~/>: ssh-add -l Could not open a connection to your authentication agent. <-- keys not loaded admin@util:~/>: ssh-agent bash admin@util:~/>: ssh-add ~/.ssh/dpnid Identity added: .ssh/dpnid (.ssh/dpnid) admin@util:~/>: ssh-add -l 1024 1b:af:88:95:7a:d8:a9:16:fb:cb:9e:0e:49:32:a3:cd [MD5] .ssh/dpnid (DSA) <-- keys loaded
Productos afectados
AvamarProductos
Avamar, Avamar ServerPropiedades del artículo
Número de artículo: 000019911
Tipo de artículo: How To
Última modificación: 03 abr 2025
Versión: 8
Encuentra las respuestas que necesitas con la ayuda de otros usuarios de Dell
Servicios de asistencia
Comprueba si tu dispositivo está cubierto por los servicios de asistencia.
Removing a rule
Select the rule to remove. The script will confirm "Line xxx has been removed from configuration file"
Return to the main menu. If we select option 3 "List Current Custom Rules" we will see the list of rules and a list of 'Changes Pending'.
Pending changes will be executed when exiting the script and selecting Y to "Save and execute rules now".