Optimize Vista for BitTorrent, eMule, P2PTV

Written by enigmax on April 09, 2007 

Expert file-sharers are well aware that XP SP2 limits incomplete connection attempts, potentially slowing down transfers. This situation has been addressed with various patches on XP but until now, users of Windows Vista would experience similar problems. Follow this guide to remove the limits and reduce potential bottle-necks.

Vista Logo

After installing Service Pack 2 on a Windows XP machine a limit was introduced to stop many TCP connection attempts on the host machine. This well-intentioned modification came as an attempt by Microsoft to limit the speed at which malicious worms (such as the infamous ‘Blaster’) could spread.

However, for software that relies on many connections such as BitTorrent, eMule and P2P TV applications, this limit has the potential to cause slowdowns in certain situations. This ‘feature’ of XP SP2 introduced by Microsoft and disliked by some file-sharers was dealt with by the useful patch available from LvlLord.

With the arrival of Windows Vista, the potential problems arising from the limits put on half-open connections are back. While Vista Ultimate offers a limit of 25 half-open connections per second, the Home Basic version offers just 2, but thanks to this great tutorial a solution is now available.

1. Download patched tcpip.sys: 64-bit tcpip.sys or 32-bit tcpip.sys.
2. Open command prompt, and run the following 2 commands:

takeown /f c:\windows\system32\drivers\tcpip.sys
cacls c:\windows\system32\drivers\tcpip.sys /G "username":F

Replace username with the actual user name that is currently being used to log on.

3. Disable the TCP/IP Auto-Tuning feature by running the following command in command prompt:

netsh int tcp set global autotuninglevel=disable

4. For 64-bit Windows Vista (x64), the integrity checks need to be disabled as it needs all drivers to be signed. So run the following command in DOS prompt:

bcdedit.exe -set loadoptions DDISABLE_INTEGRITY_CHECKS

5. Replace the tcpip.sys in C:\windows\system32\drivers folder with the patched tcpip.sys downloaded during step 1 (remember to use the correct x64 or x86 version. Normally this procedure can be done by simply logging into Windows Vista with an administrator account. However, if the process fails, reboot the computer and then press F8 to boot up in Safe Mode, and then copy and paste to overwrite the tcpip.sys.

6. Next, the maximum number of TCP half complete connection limit needs to be set in the registry. Open registry editor (regedit), and navigate to the following registry key:

HKEY_LOCALL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

7. Right click on the right pane, select “New”, then select “DWORD value”. Enter the new value name as “TcpNumConnections” (without quotes).

8. Double click on TcpNumConnections registry value, and modify the value data to the desired maximum TCP/IP connection limit that you want to allow, in decimal value. For example, enter 500 as the value data for TcpNumConnections. You can use any limit that you prefer. Alternatively, download this registry registration file that when executed, will set the TCP simultaneous connection limit to 16777214 (you can always modify the value in the file or in the registry after applied).

9. Restart computer.

Good Luck!

Read more on optimizing your BitTorrent Speed.

  • Optimize Your BitTorrent Download Speed
  • How to Speed up Your torrents
  • How to Solve Slow BitTorrent Downloads
  • Previously: ShareMonkey Helps People Buy Their Pirated Content

    Next: Automate Your BitTorrent TV Downloads on OS X

    52 Responses

    1 Apr 09, 2007 at 21:36 by Yatti

    What about the EVidpatch thingy will that be updated for Vista in the future??

    2 Apr 10, 2007 at 09:32 by Colin

    3. Disable the TCP/IP Auto-Tuning feature by running the following command in command prompt:

    netsh int tcp set global autotuninglevel=disable

    That will make your internet connection slower.

    3 Apr 10, 2007 at 10:42 by enigmax

    A big thanks to serrebi101 who has created a batchfile “to do all the commandline stuff for you and apply the needed registry values. Just extract, run as administrator”

    http://www.pirateshare.net/?id=4387284

    4 Apr 10, 2007 at 10:58 by bnoise

    The patch for XP didn’t speed up downloads. Is there any serious benchmark for Vista? Half-opened connections aren’t much used by BitTorrent as far as I know.

    5 Apr 29, 2007 at 22:21 by defcon

    The Original AutoPatch is here http://securevista.blogspot.com/2007/04/vista-tcpip-limit-patch.html

    6 Jun 04, 2007 at 01:14 by DEBob

    bnoise: Half-opened connections are when you try connecting to someone and they haven’t accepted or rejected the connection – it’s just waiting on a response. You’ll connect to more people a lot faster if you can try connecting to 100 people at once compared to 10. Although it doesn’t directly increase your download speed, it means you can connect to more peers more quickly, and that can (unless something else is screwed up) increase your download speed.

    7 Jun 14, 2007 at 19:22 by c0pywrite

    I followed these instructions and ended up with a max download of 10 kb/s. Not very satisfying :(

    8 Jun 17, 2007 at 15:57 by me

    Followed the instructions. The first speed test I did after this was my fastest! It might have worked.. Downloads with Utorrent are quite good, but didn’t change much. I guess i kinda works.. at least there’s no harm:).
    Oh and btw to replace the tcpip.sys, just right click on the “drivers” folder, go to security, and give yourself ‘full control’

    9 Jun 18, 2007 at 01:08 by tuberculo.sys

    followed instructions to the letter (x64) — utorrent is now pulling down roughly 600kB/s — within seconds of starting the torrents.

    :D

    10 Jun 26, 2007 at 20:43 by ghfd

    in the registry director i get two
    TcpNumConnections, one i created according to step 7 and one created by the file i downloaded in step 8. which is the one to be modified?

    11 Jun 26, 2007 at 23:14 by mick

    works fine, but any additional problems will be with your router. what worked for me (netopia 2247NWG-VGx) was enabling static NAT, something that wasn’t mentioned on portforward.com. And it doesn’t slow down your connection as such, but most of your bandwidth will be eaten up by torrents so any other usage will prob be affected.

    12 Jul 14, 2007 at 15:42 by Crypto

    This shit didn’t work for me. i followed it exactly twice and afterwards couldn’t boot into windows after reboot.

    13 Aug 16, 2007 at 15:36 by Matthew

    I also couldn’t boot into Vista after doing this. I had to go in through safe mode and revert back to the original tcpip.sys file.

    14 Aug 18, 2007 at 15:23 by Smackus Maximus

    Well, did exactly as it said, and my network adapter stopped working…:S…got error that network service hasn’t started. any1 got same problem??

    ps.. got vista bussines x64
    pss. if any1 knows where 2 get original tcpip.sys, i’d apreciate alot

    tnx

    15 Aug 21, 2007 at 02:15 by Maka

    No matter what I do, I’m not able to replace the tcpip.sys file in Vista Ultimate due to permission problems. I’ve even logged into the Administrator account but I got nothin.

    16 Aug 23, 2007 at 01:09 by Cumulo

    hi,

    KB938194
    KB938979

    these two Patches from microsoft are the reason why patched tcpip.sys has stopped.

    17 Aug 27, 2007 at 07:57 by Joshua

    i can e-mail whoever the origional tcpip.sys.

    Unlike most of you i actually made a backup. My e-mail is joshnewzealand’at’gmail.com

    18 Aug 27, 2007 at 08:00 by Joshua

    [quote comment="149959"]No matter what I do, I’m not able to replace the tcpip.sys file in Vista Ultimate due to permission problems. I’ve even logged into the Administrator account but I got nothin.[/quote]

    First turn off user account control. Under User Accounts and Family Safety -> User Accounts –> Turn User Account Control on or off.

    19 Aug 29, 2007 at 00:13 by Sam

    Vista won’t even connect to the internet after doing this. I’ve booted in xp to connect. i have put the original file back into the drivers folder, but still i get no connection. I cant even access my router.. :(

    20 Aug 29, 2007 at 10:43 by Cumulo

    There is no chance at moment to use the patched tcpip.sys if you have installed patches KB938194 and KB938979. You need strictly remove this patches to run patched tcpip.sys.

    no other way at moment

    21 Aug 29, 2007 at 15:19 by Sam

    ah ok then, i’ll go and remove these updates and see! :D

    22 Aug 29, 2007 at 21:40 by Sam

    I just checked in vista..and I dont even have those updates!

    So what the hell has stopped my connection from even reaching my router? :(

    23 Aug 30, 2007 at 14:07 by Alisha

    it won’t download, no matter what i do! what the hell, my computer has never rejected a download before >_>

    any other links other than lvllord?

    24 Sep 03, 2007 at 00:12 by Sam

    can nobody help?

    any ideas would be lovely! :(

    25 Sep 14, 2007 at 00:57 by Paul

    open a cmd.exe with admin rights (right click and run as admin) type in
    ’sfc /scannow’ without ‘ that will replace your files to originals.

    26 Sep 14, 2007 at 20:44 by macca

    4getting trying this thn… just system restore

    27 Oct 01, 2007 at 16:05 by Overkill

    Yep, that tcpip.sys killed my internet too! shame :(

    28 Oct 27, 2007 at 11:01 by Madwin

    This allways worked fine for me ’till now ?! I now use the béta SP1, could it be that that’s the problem?

    29 Nov 04, 2007 at 21:05 by Anonymous

    [quote comment="148706"]Well, did exactly as it said, and my network adapter stopped working…:S…got error that network service hasn’t started. any1 got same problem??

    ps.. got vista bussines x64
    pss. if any1 knows where 2 get original tcpip.sys, i’d apreciate alot

    tnx[/quote]
    yeah same thing happened to me….glad I kept my org. file

    30 Nov 07, 2007 at 17:04 by uac

    All Vista editions have 10 half-open connections TCP/IP limit. The exceding connections attempts are not lost, but they’re put in a queue.

    31 Nov 29, 2007 at 12:00 by Anon

    I this this on vista business x86 and I ended up with a bsod and it wouldn’t boot into windows. Thank God for safe mode and I was able to put back my original file :)
    Anyone know how to get it working?

    32 Nov 30, 2007 at 16:25 by III

    This tweak gave me the blue screen of death. I almost had to reformat my PC you fucking asshole. This tweak is bullshit.

    33 Dec 15, 2007 at 01:12 by ZoEb

    After initially approving it I am taking back my comments on this patch.

    I have observed it’s behaviour. Although it DOES change the max no of open connections in TCPIP.sys, it’s a virus.

    Bit Defender kept blocking it from executing itself several times even hours after I applied the patch.

    34 Dec 23, 2007 at 15:24 by Canz.Net

    http://canz.net

    35 Jan 06, 2008 at 12:46 by Idan

    For those who got blue screen of have a slow emule with vista sp1 – Vista has a problem that causes wireless networks to get “stuck” (you cannot open any new connections). Microsoft has issued an hotfix for it, however after installing it I noticed that my emule got slow, so I ran the half open connections tweak from this page again, and got the blue screen of death. only after removing it I could start windows normally again. So, if you have applied the vista hotfix, you can not install this teak. This hotfix is a part of Vista SP1, so I imagine that anyone who has an SP1 will have a slow emule running, untill this tweak here is compatible for Vista SP1.

    36 Jan 10, 2008 at 23:29 by Corn Holio

    Vista X64 TCPip Patcher, Command Line, Batchfile and Defcon`s Autopatch.

    I have tried all three on my X64 platform. I have virtually the same error on all three versions.

    I seem to have no internat connection whatsoever after applying the `Patches`.

    My version is fully up-to-date. So obviously these `Patches` no longer work.

    37 Jan 11, 2008 at 20:07 by Google

    I Think,İt is very nice information…

    Hitchhiker Nation

    38 Jan 22, 2008 at 17:47 by nope

    V64U tried uninstalling all hotfixes then installing the automated V6 going about, everything fine until the reboot; modified tcpip.sys kills my connection, replace it with original back to working 10 :(

    39 Mar 08, 2008 at 02:42 by Ryan

    When i installed the patched 64 bit tcpip.sys onto a 64 bit windows vista OS it messed it all up and made it very unstable, even with booting useing F8.

    40 Apr 03, 2008 at 01:24 by Meshuggah

    I had the same problem. After following these instructions carefully my network adapter stopped connection to the internet altogether and my NOD32 said something about POP3 and HTML protection weren’t working. I reverted to my original settings by running Securevista.net_TCPIP_UAC_PATCH, /undopatch.bat. This is the same thing as the instructions above, since doing both gave me the same results. You can google that patch and run that .bat file to undo the above instructions. It worked for me!

    41 Apr 04, 2008 at 14:22 by Roni

    I can’t beleive this
    this messed up all my windows
    cant boot into anything
    neither safe mode or last good known config
    i also did a “repair windows” and didn’t help

    DONT DO THIS PEEPS!

    42 Jun 01, 2008 at 04:23 by elisabeth

    how do i get free bit torrent for vista download on my computer please?

    43 Jun 14, 2008 at 20:15 by mike

    Do all these steps from the DOS prompt! The steps say to do some from the “command prompt” but you cant verify if it worked or not. Run CMD as an administrator. Start, programs, accessories, RIGHT CLICK ON “Command Prompt, RUN AS ADMINISTRATOR. Enter your commands from there. When you get to this step replace “username” with the user name your using. DONT LEAVE ANY QUOTATIONS IN THAT AREA”" EITHER cacls c:\windows\system32\drivers\tcpip.sys /G “username”:F

    44 Jun 24, 2008 at 05:47 by SeaKinG

    Slowed down my download speed tremendously… went from an already slow 50 kB/s to no higher than 10 kB/s. Used to be pulling 300 kB/s :(

    45 Jul 30, 2008 at 16:58 by Dont do this

    messes up your pc. i had to repair it using a boot cd

    46 Aug 02, 2008 at 22:26 by iD

    agreed with poster #52….i did this twice and messed my pc up but nothing bad that a repair wouldn’t fix.

    i read elsewhere that all you might need to do is lower the net.max.half_open and bt.connect_speed to a value of 10 or lower than 10. this seems to be working for me as i’m dl-ing between 780 – 880 kB/s. that’s normal for me anyways. hope this helps.

    47 Jan 03, 2009 at 11:48 by Syd

    Hey Joshua, could you email me that tcpip.sys file? I didn't make a backup. my email is wornspro@vt.edu

    48 Jan 05, 2009 at 04:25 by Max

    http://www.bittorrent.com

    49 Jan 16, 2009 at 04:51 by Chicken

    Followed the tutorial I'm fairly certain to the letter. Luckily I created a copy of tcpip.sys when I replaced it. BE WARNED! I could NOT boot into windows, NOT EVEN SAFE MODE! It would crash when loading normal or safe. Be sure you can replace the patched file with the original file before you even attempt this! I used an install of ubuntu I have on a USB key to go back into my drivers folder and change the modified file back to the original copy I had saved. Apparently you can't even fix this problem with a windows repair from the installation disk, if this happens to you as well, you might be looking at a reformat if you do not have the means to fix it! Proceed with caution, seems like this would have some benefits that may be worth the risk, but only do this if you are certain you could fix it should things go wrong without booting into windows under any mode.

    50 Jan 18, 2009 at 06:28 by hedpe2003

    CAUTION!!!

    I don't know if it is the latest updates in Vista, or the tcpip.sys file that is linked (I downloaded the 64-bit version for my 64-bit system)… but this _BROKE WINDOWS_, to where it would not boot. I can't be sure what exactly was the problem; but my patched version was correct and I followed the steps exactly.

    Luckily I had created a back-up, and replaced tcpip.sys with it; so no harm no foul…

    If you decide to try this…

    PLEASE CREATE A BACKUP AND KNOW HOW TO USE IT!

    51 Jan 24, 2009 at 02:38 by WARNING!

    This patch NO LONGER WORKS if you have updated your Vista to the latest security updates, it will not boot into Vista, even in Safe Mode and restoring with Vista boot cd does not even work. Like many other people out there, I had to boot up Ubuntu from a CD and manually restore the original tcpip.sys file, which luckily I have backed up. So if you are not an advanced user, DO NOT USE THIS PATCH, it is outdated and will mess up your Vista completely. This is not a joke. The owner of this article is a n00b for not updating or completely removing it by now.

    52 Jan 24, 2009 at 02:51 by CAUTION

    Yes, you would have to every time at bootup hit F8 and choose "Disable Driver Signature Enforcement" in advanced options, EVERY TIME, this now applies to ALL Vista versions, not only 64bit. Or you would use a program like ReadyDriverPlus which will automate the bypass for you.

    Responses are closed

    All remaining responses will continue to be archived. Use the TorrentFreak forums if you want to discuss something.