You will need to utilize IPSec.
Note IPSeccmd.exe will run on Windows XP and Windows Server 2003 operating systems, but the tool is only available from the Windows XP SP2 Support Tools package.
Via a login script, you can execute the following command as an example:
IPSeccmd.exe -w REG -p “Block TCP 25 Filter” -r “Block Outbound TCP 25 Rule” -f 0=*:25:TCP -n BLOCK -x
Here’s Microsoft link which should point you in the right direction.