Example of the Netsh management firewall for batch processing

Source: Internet
Author: User

The function of the following script is to modify existing firewall rules to allow 192.168.0.0/16,10.0.0.0/8 remote Windows system; (Save as BAT file to run)

@echo off echo "Start Windows Firewall ..." netsh advfirewall set allprofiles state on echo "set Remote Desktop (TC p-in) ' s remoteip= ' 192.168.0.0/16,10.0.0.0/8 ' "netsh advfirewall firewall set rule name=" Remote Desktop (tcp-in) "New Re moteip= "192.168.0.0/16,10.0.0.0/8" echo "Set Remote Desktop-remotefx (tcp-in) ' s remoteip= ' 192.168.0.0/16,10.0.0.0/8 ' "netsh advfirewall firewall set rule name=" Remote Desktop-remotefx (tcp-in) "New remoteip=" 192.168.0.0/16,10.0.0.0/8 "Pause

netsh command reference URL: http://msdn.microsoft.com/zh-cn/library/cc778925 (v=ws.10). aspx

This article is from the "Margin with Wish" blog, please be sure to keep this source http://281816327.blog.51cto.com/907015/1582849

Example of the Netsh management firewall for batch processing

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.