Can't add IP address to storage account

%3CLINGO-SUB%20id%3D%22lingo-sub-2244526%22%20slang%3D%22en-US%22%3ECan't%20add%20IP%20address%20to%20storage%20account%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2244526%22%20slang%3D%22en-US%22%3E%3CP%3EI%20can%20no%20longer%20add%20an%20IP%20address%20to%20a%20storage%20account%20networking%20using%20the%20portal.%20This%20started%20within%20the%20last%20week.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20get%20the%20message%20%22%3CSPAN%3EInvalid%20argument%3A%20'The%20prefix%20must%20be%20between%200%20and%2030.'.%22%20I've%20tried%20a%20valid%20IP%20address%20and%20CIDR%20notation.%20(71.59.0.15%20or%2071.59.0.15%2F32).%3CBR%20%2F%3E%3CBR%20%2F%3EIs%20this%20a%20problem%20with%20the%20Azure%20portal%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2245721%22%20slang%3D%22en-US%22%3ERe%3A%20Can't%20add%20IP%20address%20to%20storage%20account%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2245721%22%20slang%3D%22en-US%22%3EWe're%20experiencing%20the%20same%20issue%20as%20of%20today.%20Was%20working%20last%20week.%20Is%20there%20a%20fix%20for%20this%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2246527%22%20slang%3D%22en-US%22%3ERe%3A%20Can't%20add%20IP%20address%20to%20storage%20account%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2246527%22%20slang%3D%22en-US%22%3EExperiencing%20this%20issue%20as%20well%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2246549%22%20slang%3D%22en-US%22%3ERe%3A%20Can't%20add%20IP%20address%20to%20storage%20account%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2246549%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1013432%22%20target%3D%22_blank%22%3E%40viwaabf%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%20have%20exactly%20the%20same%20problem%20-%20can%20add%20it%20as%20a%20%2F30%2C%20but%20that's%20clearly%20no%20use.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I can no longer add an IP address to a storage account networking using the portal. This started within the last week.

I get the message "Invalid argument: 'The prefix must be between 0 and 30.'." I've tried a valid IP address and CIDR notation. (71.59.0.15 or 71.59.0.15/32).

Is this a problem with the Azure portal?

20 Replies
We're experiencing the same issue as of today. Was working last week. Is there a fix for this?
Experiencing this issue as well

@viwaabf 

 

Also have exactly the same problem - can add it as a /30, but that's clearly no use.

I experienced the same problem but i found a workaround by creating a network rule via the Azure CLI. You can find the instructions here: https://docs.microsoft.com/en-us/azure/storage/common/storage-network-security?tabs=azure-cli#managi.... I guess PowerShell should also work, so it must be a bug in the portal.

 

I just raised a support request at Microsoft to solve the problem in the portal.

From Azure Portal- Navigate to Storage account which you want to allow Secure network connection..
1) Go to the storage account you want to secure.
2) Select on the settings menu called Networking.
3) Check that you've selected to allow access from Selected networks.

To grant access to an internet IP range, enter the IP address or address range (in CIDR format) under Firewall > Address Range.
To remove an IP network rule, select the trash can icon next to the address range.
Select Save to apply your changes.

Note: You must provide allowed internet address ranges using CIDR notation in the form 16.17.18.0/24 or as individual IP addresses like 16.17.18.19.
Small address ranges using "/31" or "/32" prefix sizes are not supported. These ranges should be configured using individual IP address rules.
I know how to add the IP address. I get the following error with valid IP addresses and CIDR notations.

"Invalid argument: 'The prefix must be between 0 and 30.'."

Experiencing the same issue. Unable to add a single IP address

Please are you adding Internal IP or External IP range in firewall address?

@Seshadrrmy own single external IP address. The IP address is a valid external IP address.

When adding it in the Networking > Firewall for the storage account I receive the following error message.

The IP address is a single, valid external IPV4 address.Screenshot 2021-03-31 at 14.38.51.png

I need to add a single IP address. I've tried 71.59.0.15, 71.59.0.12/32 and get the same error. The field validation should allow individual IP addresses or CIDR prefixes between 0 and 32.

It also did used to allowing single IP addresses, as I have many storage accounts, each with a couple of single external IPV4 IP addresses in the firewall.

Screenshot 2021-03-31 at 14.48.40.png

Try to use with CIDR notation with a small range, Usually, when you access the storage explorer on your own browser it will automatically pick up the client IP address where you can add with a single range, however for the definite manual range try to use CIDR notation. I have been tested with the same IP which i have received from ISP with CIDR which results in the success
CIDR notation using /31 and /32 will not work.
A small CIDR range is unacceptable as /30 results in 4 IP addresses having access.

Picking up my own client IP is fine, but this doesn't work when I need to add other single IP addresses for those without access to the Azure portal.
I tested with CIDR /30 which has a minimum host address which works for me.
Yes, through Portal the argument error in which is accepting from o to 30 CIDR, whereas by CLI it accepts with your own IP

az storage account network-rule add --resource-group "myresourcegroup" --account-name "mystorageaccount" --ip-address "16.17.18.19"

Just writing to confirm getting same behavior in the portal today as I was looking for a solution same as everyone else. @Tom-S-2060 

Microsoft has confirmed that there is a problem in the portal and they are working on a solution. In the mean time it is only possible to add a single IP address through the cloudshell (Powershell or Azure CLI can also be used).

I will post an update when Microsoft confirmed the issue is solved.
The problem seems to be solved: this morning I could add an IP address again.