DEP is part of the OS, it defaults to on in 2003 Server, and off in XP... it isn't available on XP pre-SP2, and isn't supported by all CPUs in hardware, but can be implemented in software. Many KPT clients fail DEP testing anyway, especially the ones which use the KPTTrans section, as DEP requires that no section be declared Writeable, and Executable in the kernel, which is why a decent DEP implementation is good at stopping hacks.
Many linux kernels are built with DEP enforced. It is possible, theoretically, to build a Windows program which implements DEP in software, or hardware where available, regardless of the OS... but it would have to give way to the OS on systems above XP SP2 where DEP is handled via the kernel, and only kick in if the OS doesn't support DEP. The other option is to check the OS supports DEP, and disallow the program from running unless it is enabled.
In short, it's a heck of a lot of work, and it's implementation would be similar to anti-debug implementation.
I wouldn't like to recommend a firewall, as there are many many good options out there. However, I can tell you that running a firewall on your gateway, rather than on your server will interfere with your server executable less, and being able to control the firewall programatically from your server will help you stop hackers quicker than if you have to manually check logs and block IPs.
Running the firewall in a gateway often means in your router / switch box, though you can use a second server. Controlling it programatically often means accessing it via telnet / SSH / scripted web browser... catching hackers in the logs is the sort of thing that PT Protector does, but that disables user IDs, not IPs, so some adaptation would be required to do the job so thoroughly. I know DKs original idea was to re-write it as a proxy, then detected logs could be blocked in the proxy... DeleGate proxy supports a plug-in system for new protocols, so it may be possible to write an effective log alert IP block via that proxy.
Your description of CLSAFE_CODE is an example of it doing exactly what it is supposed to. It will disconnect anyone who connects with a client who's checksum does not match the one passed as it's parameter. The checksum of any client disconnected because it does not match is logged in the server logs. Take the code your OFFICIAL client uses (the one your good players have) and use that as the parameter for CLSAFE_CODE.
After that, any attempt to log in with a modified (or similar protocol compatible version correct) version of that client with cause a DC and server log entry.

