 |
|
 |
Hello to every one,
I'm developing an application that need to do the following:
1) Create a software wireless hotspot (SoftAP).
2) When a client first connect to the hotspot using its browser then redirect to a local webpage.
3) Allow te client to go browsing to the internet through a shearing internet connection on the same machine.
I know I can use Win7 Wireless Hosted Network API to create the SoftAP and also know I can use ICS (Internet Connection Sharing) to share the internet connection between the "public" network adapter and the hotspot so every client conected to the SoftAP may access the shared internet connection, so my quiestion is:
Can I use WFP to intercept the trafic between the SoftAP and ICS and provide the redirection I need (2)?
Thanks a lot in advance
jcgalveza
|
|
|
|
 |
|
 |
I was Using your code to learn and do a little parental control system as a project in university. I started adding basic functions from beginning, testing at each stage. when FwpmFilterADD0 function was added, i always get the "Error Code 5" which is defined in windows as "Access Denied". i think i should run it as Administrator to solve it maybe. but how do i do it programaticaly? also how to test it in Visual Studio? p.s. your article is great thank you
|
|
|
|
 |
|
 |
How to build firewall in win32 using visual studio 2008? Programing in Win32 SDK Visual studio 2008 windows xp and newer How to implement packet filter firewall? what are the basic needs? Which APIs will be needed and functions for building firewall? Form where to start? Help me asap. Thank you in advance!
|
|
|
|
 |
|
 |
first,thanks for your code ,it's very good and helps me very much.But I have a problem here that can I set other filtering rules except the IP address? I'm looking forward to hearing from you.
|
|
|
|
 |
|
 |
At first, thanks for your code, and I'm doing the packet filter on Win7. But using your code, it dosen't work at all. Besides, I looked others codes doing the same thing, and they all can't work.
If you has changed your code, and had done packet filter successfully, please reply me, or Email to me(davidchuhftu@yahoo.cn). Thank you once more!
|
|
|
|
 |
|
 |
Hi, dont you have the project ready for visual studio, I just cant get it compiled.
Thanks
|
|
|
|
 |
|
 |
Hi, loved your work its amazing, Ive been looking for something like this for a long time, I just wanted to know if there is a way to make a white-list of allowed ip address without adding all the blocked ips.
Thanks
|
|
|
|
 |
|
 |
I set up a project in Visual Studio 2008, made all the settings needed so the sources would compile(Downloading the SDK, setting up paths, etc), compiled, ran as administrator and...
Pinging the IP addresses added in the filter... works.
Accesing them over HTTP... works
Where is the filtering? What am I doing wrong?
|
|
|
|
 |
|
 |
I managed to resolv the problem, it was my fault. I got some compilation errors and forced some casts, that is why it did not work.
Note to others, if you get compilation erros like "cannot convert parameter 1 from 'char [2]' to 'STRSAFE_LPWSTR'" go to Project Properties -> Configuration Properties -> General and put "Not Set" at "Character Set" option.
|
|
|
|
 |
|
 |
hi mahesh.....m currently programming a firewall myself...wanted know if FWPS Structures could be used in normal wfp app without having to write kernel drivers.For example can i use fwps_callout0 in my user mode code. and if dev c++ could be used to compile wfp code..
thanx...desperately waiting for ur reply
|
|
|
|
 |
|
 |
Hi I'm aware this is very old, but for the sake of people still looking at this code, the answer to your question is Yes, it is possible in user mode. However, if you want the filters to be persistent across restarts etc without re-initializing them using your user-mode program, then you will need to write a service. Keeping the service on auto-start will ensure the filters are ALWAYS active. However, just be aware that the service itself can be stopped or removed at any time with appropriate Administrator privileges.
|
|
|
|
 |
|
 |
Hi,
when i tried to execute PacketFilter.exe on vista, it is showing the below error:
Error starting firewall. GetLastError() 0x0
Press any key to stop firewall...
Can you please tell me, what went wrong?
Regards
|
|
|
|
 |
|
 |
Just run it as Administartor.
|
|
|
|
 |
|
 |
Hi, i get this error too and i am the administrator on my laptop. There's one account, ive checked the type and it says Administrator, password protected.
I'm using Win 7 Ultimate.
Any help would be greatly appreciated as this is such an interesting project!
|
|
|
|
 |
|
|
 |
|
 |
incomplete sample for the demo
|
|
|
|
 |
|
 |
my name is vivek and i am studying 4th year b.tech Information and Communication technology. i jus saw this article on this site regarding development of a firewall for vista. and i have a few questions regarding that and i hope you people can help me out.
i am working on development of a firewall and i am new to windows programming and so i thought i could start of with your code. i am going to restrict my self to the development of a packet filter for which i thought i could use this project as a template to learn more and build this into a graphical environment. but i face a few preoblems.
firstly i ran the sample code on my vista with the firewall turned on and it showed me an error on the console which said "error starting firewall", then i turned the firewall off but then it shows me the same error. the fireall doesn't start and i cannot check if its working.
i can understand the code and the api libraries on the windows website help me out with the documentation, but then its the compiling and executing part that seems to be the problem i hope you people can help me out by jus briefing me through the working and how you developed this application using windows sdk and visual studio and some resources for learning about visual c++
vivek
|
|
|
|
 |
|
 |
Hi,
I am trying to make a managed wrapper around the PacketFilter class using VC++, so that i can use in C#. Please help me in this regard.
|
|
|
|
 |
|
 |
Hi,
These articles might help you:
http://www.ondotnet.com/pub/a/dotnet/2003/01/13/intromcpp.html
http://www.ondotnet.com/pub/a/dotnet/2003/03/03/mcppp2.html
http://www.ondotnet.com/pub/a/dotnet/2004/03/29/mcpp_part3.html
http://swatrant.blogspot.com/
|
|
|
|
 |
|
 |
Thank u mahesh. Done my job.
Could u plz tell, How can i apply subnetmask along with the ipaddress??
Could u provide c++ code to that?
modified on Wednesday, September 24, 2008 6:42 AM
|
|
|
|
 |
|
 |
would you please provide me the souce code of the managed wrapper?
|
|
|
|
 |
|
 |
This is a really nice piece of code
I got one question; Is it possible to block all traffic, and rather add exceptions that are allowed?
Regards,
Thomas
|
|
|
|
 |
|
 |
Hi Thomas/Others,
This is gud question asked by Thomos,
Is there any way to do that??
Can others give there inputs on this
best regards
Suren
|
|
|
|
 |
|
 |
I have created a vcproj using these files and compiled using VS 2008 buty getting linking erros. Please let me know what libraries we need to include.]
Thanks,
Ankush
|
|
|
|
 |
|
 |
Hi,
Make sure that following things are properly configured project properties (Project Menu > Project Properties) in your solution/project workspace:
1. Navigate to Configuration Properties > C/C++ > General. Here, provide the path of Windows SDK headers files' directory in "Additional Include Directories" option. (For example, C:\Program Files\Microsoft SDKs\Windows\v6.1\Include)
2. Navigate to Configuration Properties > Linker > General. Here, provide the path of Windows SDK libraries' directory in "Additional Library Directories" option. (For example, C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib)
3. Next, navigate to Configuration Properties > Linker > Input. Here, in the "Additional Dependencies" option add following libraries:
Ws2_32.lib Fwpuclnt.lib Rpcrt4.lib
Fwpuclnt.lib is the library which contains WFP implementations.
http://swatrant.blogspot.com/
|
|
|
|
 |