Авамар: Як додати або видалити власні правила брандмауера Avamar за допомогою edit-firewall-rules.sh (версії 7.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 .

Функції: 
  • Частина стандартної версії Avamar Firewall RPM, що поставляється з v7.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. 
Після завантаження ключів від імені адміністратора перейдіть до користувача root за допомогою "su - "


Запуск скрипту:
Завантажте ключі SSH перед запуском скрипта.  

Якщо ключі не завантажені, скрипт може дати збій при копіюванні правил в інші вузли.  

Для отримання додаткової інформації дивіться статтю «Нотатки» або Посібник з системного адміністрування 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.
  • Протокол: 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.