Windows Network Optimization Script (No BS Edition)
This script sets up your Windows box for clean connections, low ping, and minimal latency. It disables junk services, patches your TCP stack, and makes sure your NIC isn’t throttled by power-saving nonsense. If you’re running ops or hosting, this is your baseline.What It Does
- Kills Teredo, 6to4, and ISATAP tunnels
- Disables TCP autotuning and offload garbage
- Sets MTU manually (you choose the value)
- Flushes DNS and resets Winsock
- Disables power-saving on NICs
- Kills background bandwidth leeches
Script: optimize_network.bat
Code:
@echo off
title TMG Network Optimizer
color 0A
echo [*] Disabling unused IPv6 tunnels...
netsh interface teredo set state disabled
netsh interface 6to4 set state disabled
netsh interface isatap set state disabled
echo [*] Disabling TCP autotuning...
netsh interface tcp set global autotuninglevel=disabled
echo [*] Disabling TCP chimney offload...
netsh int tcp set global chimney=disabled
echo [*] Disabling RSS and NetDMA...
netsh int tcp set global rss=disabled
netsh int tcp set global netdma=disabled
echo [*] Setting MTU (manual input recommended)...
set /p mtu="Enter optimal MTU (e.g. 1472): "
netsh interface ipv4 set subinterface "Ethernet" mtu=%mtu% store=persistent
echo [*] Disabling power saving on NICs...
powercfg -change -standby-timeout-ac 0
powercfg -change -monitor-timeout-ac 0
echo [*] Flushing DNS and resetting Winsock...
ipconfig /flushdns
netsh winsock reset
echo [*] Disabling Delivery Optimization...
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" /v DODownloadMode /t REG_DWORD /d 0 /f
echo [*] Done. Reboot to lock it in.
pause
How to Use
- Save the script as optimize_network.bat
- Right-click → Run as Administrator
- Reboot your system
- Test ping:
Code:
ping -n 10 tmgclan.com
Notes
- MTU should be tested manually:
RunCode:ping www.google.com -f -l 1500
- NIC name may vary—adjust `"Ethernet"` to match your adapter
- Safe to revert—nothing destructive here