如何让局域网内的人不能访问自己,而自己又能访问局域网

来源:百度知道 编辑:UC知道 时间:2024/05/24 13:14:36

这个问题很复杂 一般都要设置局域网共享权限的.如果你不懂那给你个批处理文件你可以自己在每台电脑上运行一下.
@echo off
@echo.
@echo.
@set/p var=开启或关闭局域网共享[y/n] :
@if %var%==y goto a
@if %var%==n goto b
exit

:a
@reg add HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v restrictanonymous /t reg_dword /d 0 /f
@sc config lanmanserver start= auto 1>nul 2>nul
@sc config LmHosts start= auto 1>nul 2>nul
@sc config lanmanworkstation start= auto 1>nul 2>nul
@net start lanmanserver 1>nul 2>nul
@net start LmHosts 1>nul 2>nul
@net start lanmanworkstation 1>nul 2>nul
@echo.
@ipconfig|findstr IP
pause>nul&exit

:b
@sc config lanmanserver start= disabled 1>nul 2>nul
@sc config LmHosts start= disabled 1>nul 2>nul
@sc config lanmanworkstation start= disabled 1>nul 2>nul
@net stop lanmanserver 1>nul 2>nul
@net stop LmHosts 1>nu