Quick question: does anybody know how I can block a port from being used in Windows OS? I should code a simple firewall that blocks a specific port for protocols such as SMTP, ICMP and etc. I'd appreciate it if somebody could help me with this. I don't need the actual code just tell me what I should do please. Thanks in advance.
Posted on 2007-01-20 01:03:37 by XCHG
IMHO, the best way is to write a driver for it..? This would require kernel-mode programming knowledge. On WinXP Sp2 you can communicate with windows' firewall, but that's not what you want, I think.
Posted on 2007-01-20 09:45:30 by ti_mo_n
Blocking a port sounds like an interesting project. I'm quite keen to see how it would turn out to be like.  ;)
Posted on 2007-01-20 10:35:15 by roticv
Actually, you need a NIDS Miniport(filter :P) driver, but it's not so easy thing.
However,you can also use IP Filter Driver which is a part of windows (no 3th party !) and it's very easy to use
Here, it's a example project about IP Filer driver.
http://www.codeproject.com/internet/FwHookDrv.asp

If you need realy good thing, NIDS is the only solution.
Posted on 2007-01-20 14:42:48 by Dite
Gosh, I've been trying to do this for ages. I mean, the pictures shows up a promising firewall but as I am not a codeproject.com member I cant download the sources. The concepts are interesting tho.

Is there any asm equivalent somewhere? This sort of stuff, I mean packet blocking, ip blocking, port blocking, etc should be conceptually more simple in asm. I dont know even where to start but I will start coding some stuff on it. Good that you put up this point. Hopefully some socks gurus would come with some asm tutorial on it.
Posted on 2007-01-20 16:28:33 by codename
The Code Project registration is free AFAIK. I would recommend investing in it ;)
Posted on 2007-01-20 16:34:18 by SpooK

The Code Project registration is free AFAIK. I would recommend investing in it ;)

Thanks for the advice but I am registered in so many places I forgot most of them. Soon I will suffer from baldness and memory leaks. Thankfully the explanations they leave in the article pages are enough to start having ideas.
Posted on 2007-01-20 16:38:38 by codename
s/NIDS/NDIS :)
Posted on 2007-01-20 16:56:31 by f0dder

s/NIDS/NDIS :)


:):)
Posted on 2007-01-21 02:14:28 by Dite
Okay, thank you everyone. Unfortunately, I was supposed to hand in the program today so I guess there is no way I can accomplish such task in a short break. Anyway, I appreciate your concern.
Posted on 2007-01-21 22:52:19 by XCHG