I'm looking for a free firewall that will allow me to block a list of IP ranges in long format? Is there anything of the type for windows?
- posted
18 years ago
I'm looking for a free firewall that will allow me to block a list of IP ranges in long format? Is there anything of the type for windows?
What do you mean "long format"? You mean subnets? Networks? I am not a Windows user but, all Linux/Freebsd firewalls as well as Cisco, etc. So I would think the Windows ones would also.
Michael
IPs can be changed into integer values. This is an easy way of checking to see if an ip falls between a range. ipFROM (example 1003230032) ipTO (example 1123892933)
check out http://ip-to-country
Private Function ConvertToLong(ByVal IPAddress As Object) As Object
Dim x As Integer Dim Pos As Integer Dim PrevPos As Integer Dim Num As Integer
If UBound(Split(IPAddress, ".")) = 3 Then ' On Error Resume Next For x = 1 To 4 Pos = InStr(PrevPos + 1, IPAddress, ".", 1) If x = 4 Then Pos = Len(IPAddress) + 1 Num = Int(Mid(IPAddress, PrevPos + 1, Pos - PrevPos - 1)) If Num > 255 Then ConvertToLong = "0" Exit Function End If PrevPos = Pos ConvertToLong = ((Num Mod 256) * (256 ^ (4 - x))) + ConvertToLong Next End If
End Function
Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.