I know that IPSec can also be done only to allow an IP access, with Netstat-an can see an IP is accessing my machine 3389 port, I would like to do monitoring to allow an IP access and then alarm or input >*.txt such ...
You are in the firewall set to allow only a single IP even you 3389 not?
The script is not omnipotent ...
I just saw it. It is true that Windows ' own firewalls can be recorded. Knot Placard Thank you ...
Here's an alternative approach
1, save the following code as a VBS file
Copy Code code as follows:
Set Obji = GetObject ("winmgmts:{impersonationlevel=impersonate}! Win32_service= ' TermService ' ")
If Obji. Totalsessions > 0 Then
WScript.Echo "Warning, there is a remote user connected to enter! "
End If
2, the above script into the planning task, every 10 minutes run once;
3, the principle of this method is very simple, if a user connected to enter, then the total number of sessions will be greater than 1, at this time prompted the alarm!