Skip to content

Commit

Permalink
win
Browse files Browse the repository at this point in the history
  • Loading branch information
ppabc committed Jun 8, 2016
1 parent aeefab9 commit f5b2ffc
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 0 deletions.
File renamed without changes.
18 changes: 18 additions & 0 deletions windows/firewall.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
echo off
cls
set var=30000
set end=30010
:continue
set /a var+=1
echo add port %var%
netsh firewall add portopening TCP %var% ftp_data_%var%
if %var% lss %end% goto continue

netsh firewall set portopening all 80 aqzt.com-80 enable
netsh firewall set portopening all 443 aqzt.com-443 enable
netsh firewall set portopening all 3399 aqzt.com-3399 enable
netsh firewall set portopening all 3299 aqzt.com-3299 enable
netsh firewall set portopening TCP 3389 aqzt.com-3298 enable CUSTOM 1.1.1.11

echo complete
pause
17 changes: 17 additions & 0 deletions windows/firewall_del.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
echo off
cls
set var=30000
set end=30010
:continue
set /a var+=1
echo del port %var%
netsh firewall delete portopening TCP %var%
if %var% lss %end% goto continue

netsh firewall delete portopening all 80
netsh firewall delete portopening all 443
netsh firewall delete portopening all 3399
netsh firewall delete portopening all 3299

echo complete
pause
22 changes: 22 additions & 0 deletions windows/ipsec.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
echo 创建安全策略
Netsh IPsec static add policy name = APU安全策略

echo 创建筛选器是阻止的操作
Netsh IPsec static add filteraction name = stop action = block

echo 创建筛选器是允许的操作
Netsh IPsec static add filteraction name = open action = permit

echo 建立一个筛选器可以访问的终端列表
Netsh IPsec static add filterlist name = 可访问的终端列表
Netsh IPsec static add filter filterlist = 可访问的终端列表 srcaddr = 203.86.32.248 dstaddr = me dstport = 3389 description = 部门1访问 protocol = TCP mirrored = yes

echo 建立一个筛选器可以访问的终端列表
Netsh ipsec static add filter filterlist = 可访问的终端列表 Srcaddr = 203.86.31.0 srcmask=255.255.255.0 dstaddr = 60.190.145.9 dstport = 0 description = 部门2访问 protocol =any mirrored = yes

echo 建立策略规则
Netsh ipsec static add rule name = 可访问的终端策略规则 Policy = APU安全策略 filterlist = 可访问的终端列表 filteraction = stop

echo 激活策略
netsh ipsec static set policy name = APU安全策略 assign = y
pause
16 changes: 16 additions & 0 deletions windows/mysql/mysql.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
::WIN MYSQL 备份脚本
::## http://www.aqzt.com
::##email: [email protected]
::##robert yu
@echo off
set name=%date:~0,10%_%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%
set name=%name: =%
set name=%name:/=-%
md D:\backup\%name%
"D:\MySQL Server 5.5\bin\mysqldump.exe" --opt -u test1 --password=E8m2G6f6aaa test1 > D:\backup\%name%\test1_%name%.sql
echo test1_%name% >>D:\backup_time.txt
"D:\MySQL Server 5.5\bin\mysqldump.exe" --opt -u test2 --password=C5q8w2X5bbb test2 > D:\backup\%name%\test2_%name%.sql
echo test2_%name% >>D:\backup_time.txt
"C:\Program Files (x86)\WinRAR\WinRAR.exe" a "D:\backup\%name%.rar" D:\backup\%name%
del /s/q/f D:\backup\%name%
exit
File renamed without changes.

0 comments on commit f5b2ffc

Please sign in to comment.