Avamar: edit-firewall-rules.sh 를 사용하여 사용자 지정 Avamar 방화벽 규칙을 추가하거나 제거하는 방법(v7.3 이상)

Résumé: 이 문서에서는 edit-firewall-rules.sh 스크립트를 사용하여 사용자 지정 Avamar 방화벽 규칙을 추가하거나 제거하는 방법에 대해 설명합니다. 이 기능은 Avamar v7.3 이상에서 사용할 수 있습니다.

Cet article concerne Cet article ne concerne pas Cet article n’est associé à aucun produit spécifique. Toutes les versions du produit ne sont pas identifiées dans cet article.

Instructions

Avamar v7.3 이상에서는 사용자가 자신의 고유한 iptables 규칙을 추가하거나 제거할 수 있는 툴을 사용할 수 있습니다.

기능: 
  • v7.3과 함께 제공되는 표준 Avamar Firewall RPM의 일부입니다.
  • 사용자는 자신의 사용자 지정 iptables 규칙을 추가하거나 제거할 수 있습니다.
  • 사용자 지정 규칙은 Avamar 버전 업그레이드 후에도 유지됩니다.
  • 사용자 지정 규칙은 방화벽 패키지 업데이트 후에도 유지됩니다.
avfwb 보안 RPM에 의해 다음 새 파일이 시스템에 설치됩니다. 파일은 다음 위치에 있습니다. /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 서비스를 다시 시작하여 새 규칙을 적용합니다.

루트 사용자로 위의 스크립트를 실행합니다. 
관리자 사용자로 키를 로드한 후 "su - "


를 사용하여 루트 사용자로 전환합니다. 스크립트 실행:
스크립트를 실행하기 전에 SSH 키를 로드합니다.  

키가 로드되지 않은 경우 규칙을 다른 노드에 복사할 때 스크립트가 실패할 수 있습니다.  

자세한 내용은 'notes' 문서 또는 Avamar System Administration Guide 를 참조하십시오.
 
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입니다.
  • 대상 포트입니다.
  • 대상: 수락, 거부, 삭제, 거부.
  • 노드 유형: All, Data, Utility입니다.
사용자 지정 규칙은 파이프 구분 선으로 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):

Informations supplémentaires

Avamar 애플리케이션 기능에 영향을 줄 수 있는 방화벽 규칙을 생성하지 않도록 주의하십시오. 예: Avamar Server 포트

에서 들어오고 나가는 트래픽 거부Avamar 필수 포트에 대한 자세한 내용은 Avamar Product Security Guide 의 최신 릴리스를 참조하십시오.

제품 보안 가이드에는 대화형이 아닌 유사한 툴 "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 

Produits concernés

Avamar

Produits

Avamar, Avamar Server
Propriétés de l’article
Numéro d’article: 000019911
Type d’article: How To
Dernière modification: 03 avr. 2025
Version:  8
Trouvez des réponses à vos questions auprès d’autres utilisateurs Dell
Services de support
Vérifiez si votre appareil est couvert par les services de support.