I use the following command to allow listening of specific HTTP ports:
netsh http add urlacl url=http://+:[port]/ user=DOMAIN\UserName
But if I need to open a range of ports, can I setup a single rule?
I didn't find any way to specify a range so I went with using built-in FOR command:
for /L %i in ([port_start],1,[port_end]) do netsh http add urlacl url=http://+:%i/ user=DOMAIN\UserName
You can get more info on the FOR command by using 'FOR /?' in command prompt. /L happened to be the one that worked for me because it builds a set of numbers given start, stop and step values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With