netsh advfirewall firewall add rule name="BlockPort01" protocol=TCP dir=out remoteport=01 action=block
Используйте команду netsh advfirewall firewall
для настройки брандмауэра Windows.
Подробнее см. http://technet.microsoft.com/en-us/library/dd734783.aspx#BKMK_3_add .
Даже если бы такая команда была (а его нет), то вы не можете заблокировать исходящий трафик, поскольку только новые версии Windows имеют поддержку исходящего брандмауэра. Используйте последнюю версию Windows.
The only method that occurs to me directly via bat file is using netsh commands to severely restrict the internal network settings... filtering and such. I'm still not convinced this will work the way you want. I'm not sure why you would use a bat file method when you could just use a software firewall and just whitelist the traffic as you see fit. However, you may be able to enable or disable a firewall configuration with a bat file that could have the desired effect.