When an IP connects my machine's 3389-port alert script _vbs

Source: Internet
Author: User
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.