解决iis默认占用全部ip的80端口问题

本文介绍如何使用httpcfg工具为IIS6设置特定IP地址的监听,包括删除默认监听、配置指定IP监听、检查配置及重启服务的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

到2003的CD下的 support/tools/Support.cab.解压出httpcfg.exe文件,COPY到windows/system32/目录下,

命令行

删除默认绑定的全部IP:

httpcfg delete iplisten -i 0.0.0.0
绑定到某IP:

httpcfg set iplisten -i 192.168.1.100
即命令使用IIS的只监听指定的IP及端口
查看绑定:

httpcfg query iplisten
删除绑定:

httpcfg delete iplisten -i 192.168.1.100
起服务

net stop http /y
net start http
iisreset
这时执行netstat -na 应该看到以下内容

TCP    192.168.1.100:80           0.0.0.0:0              LISTENING
如果还是

TCP    0.0.0.0:80           0.0.0.0:0              LISTENING
就是监听的全部IP,没对的.

国外英文帮助:

If you want to set IIS6 only listens on specific IP address, using httpcfg
to do this is the correct way.

Please run the following commands:

1. httpcfg delete iplisten -i 0.0.0.0

This removes IIS from listening on all available IPs 0.0.0.0

2. httpcfg delete iplisten -i <second ip address>

Removes IIS from listening on the second IP

3. 2. httpcfg set iplisten -i <first ip address>

Expliclitly configure IIS to be listening on the first IP

4. httpcfg query iplisten

Check the HTTP.sys IP listening list, you should only see the first IP in
it.


After this above, please run:

net stop http
net start http
iisreset

to restart HTTP service before restarting IIS. Restart IIS services will
not make the changes of HTTP.sys take effect. Or you may reboot the server.

Please check if it works this time. If problem still persists, I will
assist you on the troubleshooting.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值