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 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.
for /L %i in (32000,1,32099) do netsh http add urlacl url=http://+:%i/ user="NT AUTHORITY\NETWORK SERVICE"
–
Preengage © 2022 - 2024 — McMap. All rights reserved.