This article is a mirror article of machine translation, please click here to jump to the original article.

View: 39915|Reply: 0

[Source] .NET/C# verifies that the IP address is within the IP segment

[Copy link]
Posted on 6/2/2021 9:44:57 AM | | | |
When doing gateway current limiting and blacklisting, we may need to directly set IP segment rules to avoid adding them one by one, and we can directly add IP segments from the private network to the whitelist to verify whether the client belongs to the IP segment.

Use Alibaba Cloud load balancing to block IP access to websites
https://www.itsvse.com/thread-4777-1-1.html
#封整个段即从123.0.0.1 to 123.255.255.254
123.0.0.0/8

#封IP段即从123.45.0.1 to 123.45.255.254
124.45.0.0/16

#封IP段即从123.45.6.1 to 123.45.6.254 are commands
123.45.6.0/24


IP address translation, IP network segment translation, CIDR/Netmask translation:The hyperlink login is visible.

It can convert IP from different formats to unified formats, including IP segment conversion, subnet mask format conversion, and CIDR/Netmask format conversion. Support "." IP address conversion in format, decimal, network segment, network mask format


Code:


(End)




Previous:.NET/C# calls Exchange to send messages
Next:SLOWLOG for Redis troubleshooting
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com