1.a How to cut my Internet connection using DOS commands?
After those commands:
netsh firewall delete portopening TCP 80
netsh firewall delete allowedprogram program = "C:\Program Files\Mozilla Firefox\firefox.exe"
I was still connected to Internet!!
1.b How to reverse action 1.a using DOS command(s)?
2. Which Windows service(s) should I stop to cut my Internet connection?
Thanks
How to cut my Internet connection using DOS commands?
Moderator: DosItHelp
Re: How to cut my Internet connection using DOS commands?
budhax wrote:1.a How to cut my Internet connection using DOS commands?
After those commands:
netsh firewall delete portopening TCP 80
netsh firewall delete allowedprogram program = "C:\Program Files\Mozilla Firefox\firefox.exe"
I was still connected to Internet!!
1.b How to reverse action 1.a using DOS command(s)?
2. Which Windows service(s) should I stop to cut my Internet connection?
Thanks
Try this batch i wrote a while ago to do exactly what you want
Run once to store and change run again to restore
@echo off
SETLOCAL
:: Set the network card static to your current Local IP if you still require local subnet access
:: Set the gateway to a non internet gateway
set connection=Local Area Connection
set static=192.168.0.2
set subnet=255.255.255.0
set gateway=192.168.255.255
set dnsip=192.168.0.1
if exist "%connection%.sav" (Call :restore&goto :eof)
call :main_start
goto :eof
:main_start
Echo Saving %connection% Network Settings...
>NUL: netsh -c interface dump > "%connection%.sav"
Echo :: Setting %connection%...
Echo :: Static :%static%
Echo :: Subnet :%subnet%
Echo :: Gateway :%gateway%
Echo :: DNS :%dnsip%
>NUL: netsh interface ip set address name="%connection%" source=static addr=%static% mask=%subnet% gateway=%gateway% 1
>NUL: netsh interface ip set dns name="%connection%" source=static addr=%dnsip%
goto :eof
:restore
Echo Restoring %connection% Network Settings...
>NUL: netsh -f "%connection%.sav"
del /q "%connection%.sav"
goto :eof