Random problem: can't login remotely

Joined
Jan 10, 2007
Messages
607
Hi everyone.

So I have this problem that randomly appears on the test machines I use. I wrote some scripts that would install a Windows monitorying component, and then open up a port in the RRAS firewall to allow users to interact with the component. Randomly, after I open the firewall port (via netsh), my remote desktop session will terminate, and afterwards, the machine will not accept any inbound connections (RDP, web server requests, SNMP queries), and I have to physically go the machine and reboot it, which will clear up the problem.

This is the line in the script that adds the port to the firewall to open up:
Code:
netsh.exe routing ip nat add portmapping name="Local Area Connection" proto=UDP publicip=0.0.0.0 publicport=161 privateip=127.0.0.1 privateport=161

I think that is right, and like I said, this only randomly happens, but it still happens, which is highly undesirable since some people using these machines put them offsite, maybe in another state. ;)

Anyone had this problem before? I still can't reproduce it accurately, so it's really hard to pin down.
 

jpochedl

Limp Gawd
Joined
Jun 7, 2004
Messages
345
Hmmm.. Listen for connections on port 161 and redirect it back to itself... Should work.

Any chance this is a Server 2003 SP1 box (I assume it's a server of some sort, because IIRC the 'netsh routing' syntax isn't available under Vista or XP)... Anyhow... Could you just use the 'netsh firewall' context to allow connections to the port?

netsh firewall set portopening .... ?

Any help?
 
Joined
Jan 10, 2007
Messages
607
Yep, this is a Server 2K3 SP1 machine.

I will look at the firewall port opening thing and see if that helps. Right now I can't reproduce the problem again, even though it had no problem rearing its ugly head on two machines during a demo I was giving. :eek:

Thanks.
 
Top