-
- /*
- from: http://bbs.it-home.org
- date: 2013/2/17
- */
- $fp = fsockopen("udp://$ip ", $rand, $errno, $errstr, 5);
- if($fp){
- fwrite($fp, $out);
- fclose($fp);
- ?>
Copy code
In response to this situation, you can modify php.ini, disable the fsockopen function, and use the Windows 2003 security policy to block the local UDP port.
1), disable function
Find disable_functions and add the function name to be disabled, as in the following example:
-
- passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,
- syslog,readlink,symlink,popepassthru,stream_socket_server,fsocket , fsockopen
Copy the code
and it will take effect after restarting IIS.
2), block UDP port
Copy it to Notepad, save it as a bat file with any name, and double-click to run it.
-
-
REM Add security policy, name
- netsh ipsec static add policy name=My security policy
REM Add IP filter list
- netsh ipsec static add filterlist name=allow list
- netsh ipsec static add filterlist name=deny list
REM Add filter to IP filter list (allow Internet access)
- netsh ipsec static add filter filterlist=allow list srcaddr= me dstaddr=any description=dns access protocol=udp mirrored=yes dstport=53
REM Add filter to IP filter list (not allowing others to access)
- netsh ipsec static add filter filterlist=deny List srcaddr=any dstaddr=me description=Others to access me any protocol=udp mirrored=yes
REM Add filter action
- netsh ipsec static add filteraction name=Can action=permit
- netsh ipsec static add filteraction name=No action=block
@REM http://bbs.it-home.org
- REM Creates a link specifying IPSec policy, filter list and rules for filter actions ( Add rules to my security policy)
- netsh ipsec static add rule name=allow rule policy=my security policy filterlist=allow list filteraction=ok
- netsh ipsec static add rule name=deny rule policy=my security policy filterlist=deny List filteraction=Not possible
REM Activate my security policy
- netsh ipsec static set policy name=My security policy assign=y
-
Copy code
|