ECS:CAS 用戶端 IP 限制
Résumé: 本文介紹限制可以訪問 CAS 儲存桶的用戶端 IP 位址的功能。
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
簡介:
- 當客戶想要限制用戶端 IP 存取 CAS 貯體時,可以使用此功能。只有在限制清單下設置的IP才能訪問相關使用者。
- 默認情況下,沒有為用戶設置任何限制。
- CAS 使用者 IP 限制適用於所有 VDC 的使用者。
- 使用者的預設 IP 限制為 10,且為可設定。
注意:請聯絡 Dell ECS 遠端支援 以變更預設 IP 限制值。
設定 CAS 用戶端 IP 限制的步驟:
- 建立 CAS 使用者
- 使用要向使用者提供訪問許可權的IP清單創建.xml檔,嘗試訪問CAS使用者的任何其他IP都應失敗,並顯示
FP_AUTHENTICATION_FAILED_ERR - 使用
PUT命令,為特定使用者設定 IP 限制 - 使用
GET命令以取得或檢視為使用者設定的限制 - TB
EDIT先前為使用者設定的限制,請編輯包含 IP 的 XML 檔案,然後執行PUT - TB
DELETE先前設定的限制,請移除<ip_restrictions>127.127.127.127</ip_restrictions>執行PUT
設定 IP 限制時的範例 xml 檔:(只有這兩個 IP 可存取 CAS 使用者access_user)
cat new.xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <user_ip_restrictions_param> <ip_restrictions>127.127.127.127</ip_restrictions> <ip_restrictions>127.128.128.128 </ip_restrictions> <user_name>access_user</user_name> </user_ip_restrictions_param>
以下是 REST 命令與 PUT, GET, LIST和 DELETE 操作,根用戶必須使用訪問令牌。
例:
admin@ecsnode1:~> TOK=$(curl -iks https://localhost:4443/login -u root:*** | grep X-SDS-AUTH-TOKEN); echo $TOK X-SDS-AUTH-TOKEN: BAAcc1pZcEkxK3MyUU4xZy9ocEdnUXp0MHl2aTk0PQMAjAQASHVybjpzdG9yYWdlb3M6VmlydHVhbERhdGFDZW50ZXJEYXRhOjdlNWQ0YzFkLTkzNjEtNDBkNS1iMWE4LTUwNzE5NDEwODRiZQIADTE2ODQ4MjYzOTk5OTIDAC51cm46VG9rZW46ODYzMzEyZDEtYzA3NC00MWFjLThlMjAtZDUzZmQ3Njk2MjVhAgAC0A8= admin@ecsnode1:~>
若要設定使用者 IP 限制:
使用以下命令:PUT /object/user-cas/ip-restrictions/{namespace_name}/{user_name}
範例:
curl -ks -H 'Accept:application/xml' -H 'Content-Type:application/xml' -X PUT -d @new.xml -H "$TOK" https://10.245.xx.xx:4443/object/user-cas/ip-restrictions/cas_access/access_user
回應主體範例 1:(預設情況下,當沒有為使用者設定 IP 限制時)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <user_ip_restrictions> <user_name>access_user</user_name> </user_ip_restrictions>
回應正文範例 2:(只有下面提供的用戶端 IP 可存取使用者)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <user_ip_restrictions_param> <ip_restrictions>128.128.128.128</ip_restrictions> <ip_restrictions>127.127.127.127</ip_restrictions> <user_name>access_user</user_name> </user_ip_restrictions_param>
若要取得使用者 IP 限制:
使用以下命令:GET /object/user-cas/ip-restrictions/{namespace_name}/{user_name}
範例:
curl -ks -H "$TOK" -H "Content-Type: application/json" https://10.245.xx.xx:4443/object/user-cas/ip-restrictions/cas_access/access_user | xmllint -format -
回應正文範例:(只有下面提供的用戶端 IP 可存取使用者)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <user_ip_restrictions> <ip_restrictions>127.127.127.127</ip_restrictions> <user_name>access_user</user_name> </user_ip_restrictions>
回應正文範例 2:(GET 在未設定 IP 限制時,預設為使用者)
curl -ks -H "$TOK" -H "Content-Type: application/json" https://10.245.xx.xx:4443/object/user-cas/ip-restrictions/cas_access/access_user | xmllint -format - <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <user_ip_restrictions> <user_name>access_user</user_name>
若要列出使用者的 IP 限制:
使用以下命令:
GET /object/user-cas/ip-restrictions/
範例:(列出每個使用者的 IP 限制)
curl -ks -H "$TOK" -H "Content-Type: application/json" https://10.245.xx.xx:4443/object/user-cas/ip-restrictions | xmllint -format - <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <user_ip_restrictions_list> <userIpRestriction> <user_name>tsouser</user_name> </userIpRestriction> <userIpRestriction> <user_name>tsouser2</user_name> </userIpRestriction> <userIpRestriction> <ip_restrictions>10.245.xx.xx</ip_restrictions> <ip_restrictions>10.247.xx.xx</ip_restrictions> <ip_restrictions>10.245.xx.xx</ip_restrictions> <ip_restrictions>10.247.xx.xx</ip_restrictions> <ip_restrictions>10.243.xx.xx</ip_restrictions> <user_name>clientuser</user_name> >>>these are the restrictions set for this user </userIpRestriction> <userIpRestriction> <user_name>gctest</user_name> </userIpRestriction> <userIpRestriction> <user_name>casgcuser2</user_name> </userIpRestriction> <userIpRestriction> <user_name>user2</user_name> </userIpRestriction> <userIpRestriction> <user_name>gcu2</user_name> </userIpRestriction> <userIpRestriction> <user_name>casgcuser1</user_name> >>>all these users doesn't have any restrictions set </userIpRestriction> </user_ip_restrictions_list>
若要刪除為使用者設定的 IP 限制:
從.xml移除 IP 限制項目,並執行 PUT
cat new.xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <user_ip_restrictions_param> <user_name>clientuser</user_name> </user_ip_restrictions_param>
命令:
curl -ks -H 'Accept:application/xml' -H 'Content-Type:application/xml' -X PUT -d @new.xml -H "$TOK" https://10.245.130.65:4443/object/user-cas/ip-restrictions/clientns/clientuser
回應正文範例:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <user_ip_restrictions> <user_name>clientuser</user_name> </user_ip_restrictions>
以下範例顯示了功能在 PUT和 GET,以及在沒有限制和無限制的情況下訪問使用者:
cat new.xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <user_ip_restrictions_param> <ip_restrictions>127.127.127.127</ip_restrictions> <user_name>access_user</user_name> </user_ip_restrictions_param>
PUT:
curl -ks -H 'Accept:application/xml' -H 'Content-Type:application/xml' -X PUT -d @new.xml -H "$TOK" https://10.245.xx.xx:4443/object/user-cas/ip-restrictions/cas_access/access_user
GET:
curl -ks -H "$TOK" -H "Content-Type: application/json" https://10.245.xx.xx:4443/object/user-cas/ip-restrictions/cas_access/access_user | xmllint -format - <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <user_ip_restrictions> <ip_restrictions>127.127.127.127</ip_restrictions> <user_name>access_user</user_name> </user_ip_restrictions>
使用 JCASS,嘗試從 127.127.127.127 存取集區,並可存取:
CASScript>po 10.245.xx.xx?name=access_user,secret=centera@1234 Attempting to connect to: 10.245.xx.xx?name=access_user,secret=centera@1234 Connected to: 10.245.xx.xx?name=access_user,secret=centera@1234 CASPool Properties: Connection String: 10.245.xx.xx?name=access_user,secret=centera@1234 Cluster Time: 2020.07.07 06:32:24 GMT Buffer Size: 16384 Prefetch Buffer Size: 32768 Connection Timeout: 120000 Multi-Cluster Failover Enabled: True Collision Avoidance Enabled: False
已嘗試從不在 IP 限制清單 (即允許清單) 中的 IP 存取集區。對池的訪問應失敗,並出現以下錯誤:
CASScript>po 10.245.xx.xx?name=access_user,secret=centera@1234
Attempting to connect to: 10.245.xx.xx?name=access_user,secret=centera@1234
SDK Error Occurred:
Error Number: -10153
System Error: 0
Error: FP_AUTHENTICATION_FAILED_ERR
Error Class: null
Trace: HPPAuthCRTransaction.run<FPConnection::authenticate<Cluster.authenticate<Cluster::updateClusterInfo()<ClusterCloud::updateClusterInfo(e9f1a3c9-5cb1-3a76-a589-f639de9ad2e4)<ClusterCloud::getClusterInfo(0,ClusterInformation&,2)<FPPool::Open(10.245.130.64?name=access_user,secret=centera@1234)<_FPPool_Open(10.245.130.64?name=access_user,secret=centera@1234)<FPPool_Open8(10.245.130.64?name=access_user,secret=centera@1234)Informations supplémentaires
另請參閱《ECS 管理指南:
HTTPs://dl.dell.com/content/manual52394679-ecs-3-8-administration-guide.pdf?language=en-us
HTTPs://www.dell.com/support/manuals/en-us/ecs-appliance-software-with-encryption/ecs_p_adminguide_3_8/restrict-user-ip-addresses-that-can-access-a-cas-bucket?guid=guid-c4e67b45-46f8-46fa-93cf-f63795add0ad⟨=en-us
HTTPs://dl.dell.com/content/manual52394679-ecs-3-8-administration-guide.pdf?language=en-us
HTTPs://www.dell.com/support/manuals/en-us/ecs-appliance-software-with-encryption/ecs_p_adminguide_3_8/restrict-user-ip-addresses-that-can-access-a-cas-bucket?guid=guid-c4e67b45-46f8-46fa-93cf-f63795add0ad⟨=en-us
Produits concernés
Elastic Cloud StorageProduits
ECS, ECS AppliancePropriétés de l’article
Numéro d’article: 000214011
Type d’article: How To
Dernière modification: 18 mai 2026
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.