Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running Windows Server 2008 R2. I would like to bind the Server service which listens on port 445 to a specific ip address or interface.

Is this possible?

share|improve this question
    
Why would you want/need to do that? What actual problem are you facing? –  Ƭᴇcʜιᴇ007 Sep 24 '13 at 19:09
1  
i've got multiple nics/subnets and i don't want the service exposed to all of them. it's a basic security measure. –  CoderBrien Sep 24 '13 at 19:15

2 Answers 2

Instead of messing with trying to change how the service binds (which I don't think you can do), perhaps just use the built-in Windows 2008 firewall instead.

Create a new incoming rule for that port with a narrow scope to allow that traffic only if it comes in on a specific IP address.

share|improve this answer

You will need to install RPCCfg. This can be downloaded from TechNet on the Microsoft web site

Run rpccfg –q

C:\Program Files\Resource Kit>rpccfg -q RPCCFG: Listening on all interfaces (default configuration)

RPCCFG: Using default port settings

This tells us that we are listening on all interfaces and using default ports. Now we get a list of all the adapters, so run rpccfg –l

C:\Program Files\Resource Kit>rpccfg -l IF[65540]: Ethernet: HP NC371i Multifunction Gigabit Server Adapter IF[65539]: Ethernet: HP NC371i Multifunction Gigabit Server Adapter #2 IF[1]: Ethernet: MS TCP Loopback interface

Now we need to modify what interfaces RPC listens to. So in this instance, the first interface is our internal, and the second interface (#2) is our external, so we want to disable RPC on the second interface. So we run rpccfg –a 1 65540 This makes RPC listen on the Loopback interface and the internal interface.

C:\Program Files\Resource Kit>rpccfg -a 1 65540 RPCCFG: Listening on the following interfaces IF[1]: Ethernet: MS TCP Loopback interface IF[65540]: Ethernet: HP NC371i Multifunction Gigabit Server Adapter

You can now verify the config of RPC:

C:\Program Files\Resource Kit>rpccfg -q RPCCFG: Listening on the following interfaces IF[1]: Ethernet: MS TCP Loopback interface IF[65540]: Ethernet: HP NC371i Multifunction Gigabit Server Adapter

RPCCFG: Using default port settings

share|improve this answer
    
As of Windows 7 and Windows 8, if I use rpccfg to limit the ip addresses used (either to the loopback interface or a specific NIC), the system becomes unstable and either crashes or fails to allow me to login. This issue has been reported here social.technet.microsoft.com/Forums/windows/en-US/… and I haven't seen it addressed anywhere. –  CoderBrien Oct 14 '13 at 15:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.