Avamar. Добавление и удаление пользовательских правил межсетевого экрана Avamar с помощью edit-firewall-rules.sh (v7.3 и более поздних версий)

Summary: В этой статье описывается, как добавлять или удалять пользовательские правила межсетевого экрана Avamar с помощью сценария edit-firewall-rules.sh. Эта функция доступна в Avamar v7.3 и более поздних версиях. ...

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

В Avamar v7.3 и более поздних версиях доступен инструмент, позволяющий пользователям добавлять или удалять собственные пользовательские правила iptables .

Функции: 
  • Входит в стандартный RPM-пакет Avamar Firewall, поставляемый с версией 7.3.
  • Пользователи могут добавлять или удалять свои собственные правила iptables .
  • Пользовательские правила остаются в силе после модернизации версии Avamar.
  • Пользовательские правила сохраняются после обновлений пакетов брандмауэра.
Следующие новые файлы устанавливаются в системы с помощью RPM-пакета безопасности avfwb. Файлы находятся по адресу: /usr/local/avamar/lib/admin/security.
  • edit-firewall-rules.sh.
  • manage-custom-rules.sh.
  • avfwb_custom_config.txt.

edit-firewall-rules.sh:
  • Этот файл представляет собой интерактивный сценарий, который принимает пользовательские данные и форматирует их в формате iptables .
  • Этот файл излагает информацию в удобной для заказчика форме.
manage-custom-rules.sh:
  • Этот файл является механизмом, лежащим в основе интерактивного сценария edit-firewall-rules.sh .
  • Этот файл создает правила и команды iptables , основанные на сохраненном пользовательском наборе правил в файле конфигурации.
  • Этот файл перезапустит службу avfirewall для применения новых правил.

Запустите указанные выше сценарии от имени пользователя root. 
После загрузки ключей в качестве пользователя admin переключитесь на пользователя root с помощью команды "su - "


Running the script:
Load the SSH keys before run the script.  

Если ключи не загружены, сценарий может завершиться сбоем при копировании правил на другие узлы.  

Дополнительные сведения см. в статье «Примечания» или в руководстве по системному администрированию Avamar .
 
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.
  • Тип правила: IPv4 или IPv6.
  • Цепи: «Output», «Input», «Logdrop» или «Forward».
  • Protocol: TCP, UDP, ICMP.
  • IP-адрес источника.
  • Порт источника.
  • IP-адрес пункта назначения.
  • Порт назначения.
  • Целевой: Принять, отклонить, отбросить, отклонить.
  • Тип узла: Все, данные, утилита.
Пользовательские правила хранятся в avfwb_custom_config.txt файле в виде линий, разделенных каналами.

Формат:
IP-адрес источника | Порт источника | IP-адрес пункта назначения | Порт назначения | Протокол | Тип ICMP | Цель | Цепь | Пример типа

узла:
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.

kA5j00000008VAYCA2_1_0

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: 2

kA5j00000008VAYCA2_1_1
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'.

kA5j00000008VAYCA2_1_2

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):

Additional Information

Будьте внимательны и не создавайте никаких правил межсетевого экрана, которые могут повлиять на функциональность приложения Avamar. Например, отклонение входящего или исходящего трафика порта сервера Avamar.

Сведения о портах, необходимых для Avamar, см. в последнем выпуске руководства по безопасности продукта Avamar .

В руководстве по безопасности продукта также есть похожий инструмент «manage-custom-rules.sh», который не является интерактивным.

Как проверить, загружены ли ключи SSH, и если нет, то как их загрузить.
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 

Affected Products

Avamar

Products

Avamar, Avamar Server
Article Properties
Article Number: 000019911
Article Type: How To
Last Modified: 03 Apr 2025
Version:  8
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.