473,722 Members | 2,285 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

python for windows internet filter / firewall

Greetings,

I'm interested in a simple content-based internet firewall/filter,
similar to dansguardian (http://dansguardian.org/), but written in
python, and for windows. I assumed such a project would already exist,
but my searches on freshmeat, and google turned up empty. I would be
interested in starting my own project if necessary, so I have two
questions:

1) Does any one no of such a project?

2) Is this even reasonable in python and how might I get started? (e.g.
win32 COM?)

Thanks much
--
matthew

Jun 29 '06 #1
5 2995
> 2) Is this even reasonable in python and how might I get started? (e.g.
win32 COM?)


Don't know much (not to say nothing) about windows firewalling & the
interfaces one needs to talk to them.

But _what_ I know is: a firewall needs to be fast. The big guys in
networking put a lot of effort into pushing as much package processing as
possible into the hardware-layer.

And as much as I love python - I do not see it here, beyond a
proof-of-concept.

Diez
Jun 29 '06 #2
I thought speed might be an issue. At this point I'm not interested in
much more than toying around, so *if* there's a way to do it, I'd like
to explore the options.

--
matthew

Diez B. Roggisch wrote:
2) Is this even reasonable in python and how might I get started? (e.g.
win32 COM?)


Don't know much (not to say nothing) about windows firewalling & the
interfaces one needs to talk to them.

But _what_ I know is: a firewall needs to be fast. The big guys in
networking put a lot of effort into pushing as much package processing as
possible into the hardware-layer.

And as much as I love python - I do not see it here, beyond a
proof-of-concept.

Diez


Jun 29 '06 #3
th*****@gmail.c om wrote:
Greetings,

I'm interested in a simple content-based internet firewall/filter,
similar to dansguardian (http://dansguardian.org/),
Firewall and filter are two things totally separated!

- If you want to do something like a "page filtering", like dansguard
and squidguard, you can simple do it with python, because you have to
act like a proxy that leave of not visit a page.
- If you have to do a firewall... I think you can't, especially if you
are on win. Take a look at wipfw (wipfw.sf.net) that do what you want
but written in python,
Of course :)

and for windows.

Why? All that work with networking (and not only that) work better with
*nix OS!
I assumed such a project would already exist,
Firewall I don't think, and the same for the filtering (I know only
something like a plugin for squid, so for *nix platform).
but my searches on freshmeat, and google turned up empty. I would be
interested in starting my own project if necessary, so I have two
questions:

1) Does any one no of such a project?

2) Is this even reasonable in python and how might I get started?
(e.g. win32 COM?)
win32COM for do what?

You can do it in not so difficult manner:
Take twisted and its proxy class, make some outline code (for filter the
pages) and enjoy! (work also on win)

Thanks much -- matthew

P.s. Don't forgot to share your code, when it'll work :)

Bye,
Michele
Jun 30 '06 #4
Thanks for a detailed reply.
Firewall and filter are two things totally separated!
Sorry for being to general. I want to create a filter like
dansgaurdian. I was thinking of it also as a firewall because is
restricts traffic on a port based on content, but you're correct, they
aren't the same thing at all.
Take a look at wipfw (wipfw.sf.net) that do what you want
Thanks for the tip I'll check it out.
And for windows. Why? All that work with networking (and not only that) work better with
*nix OS!
Yes you are correct again. I am infact working on linux right now, and
it is my os of choice. How ever I need to deploy this on M$win :(
win32COM for do what?
My knowledge of COM is miniscule, but I assumed it has a low level
interface for packet filtering.
You can do it in not so difficult manner:
Take twisted and its proxy class, make some outline code (for filter the
pages) and enjoy! (work also on win)


Proxy would be an easy way, but I wanted to do it at a lower level.

Thanks again.
--matthew

Jun 30 '06 #5
th*****@gmail.c om wrote:
Thanks for a detailed reply.

I thing that now we are becoming OT... :)
because is restricts traffic on a port based on content, but you're
correct, they aren't the same thing at all.

So, what you want to do? Open and close a destination IP (domain),
following what the user see, with a firewall? It's so hard to do, and it
doesnt' sound like a good think. This is the work of a proxy, not of a
firewall.
win32COM for do what?


My knowledge of COM is miniscule, but I assumed it has a low level
interface for packet filtering.


Yes, but you have to create a dll that work at low level and has an low
level features... Something like that wipfw do: create a .sys/.vxd (if I
remember correctly) that in your case are the dll and after with an exe
(that are the python program) that teach the rules... Very bas idea, for me!
You can do it in not so difficult manner: Take twisted and its
proxy class, make some outline code (for filter the pages) and
enjoy! (work also on win)


Proxy would be an easy way, but I wanted to do it at a lower level.


But you _can't_ with python. How you create a .sys/.vxd file? Also that
has only few kb program? And don't such more than few kb memory?

Keep the proxy way or switch to another language :)
Thanks again. --matthew


Michele
Jun 30 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1514
by: Raymond Hettinger | last post by:
QOTW: "Python seems to encourage and reward incremental effort, and it leads one to explore extensions and improvements to programs because the language makes it relatively easy to see how to do the extensions." -- Ron Stephens "When writing programs in Python, write Python programs" -- Jeff Epler's advice to those forcing themselves to write code using idioms learned in other languages "Oh come on, now, just because Java does it..."...
5
2069
by: M. Laymon | last post by:
I just installed Python 2.3.3 under Windows XP professional. After I did, my wife tried to access her email using Outlook Express and got the error messages: Your server has unexpectedly terminated the connection. Possible causes for this include server problems, network problems, or a long period of inactivity. Account: 'incoming.verizon.net', Server: 'outgoing.verizon.net', Protocol: SMTP, Port: 25, Secure(SSL): No, Error Number:...
10
3689
by: Andrew Dalke | last post by:
Is there an author index for the new version of the Python cookbook? As a contributor I got my comp version delivered today and my ego wanted some gratification. I couldn't find my entries. Andrew dalke@dalkescientific.com
5
2416
by: Andrea Vincenzi | last post by:
Help me please, I'm totally stuck! My Visual Studio 2003 debugger stopped working after I installed Windows XP Service Pack 2. Here is what happens (with any project, even a "Hello, world" message): the first time I open a project and try to start it in debug mode, Visual Studio hangs before executing the first line of code. The only way to stop it is to kill the process using the Task Manager. If I open the same project a second time and...
2
2054
by: Jeffrey Tate via DotNetMonster.com | last post by:
The error is: The proxy settings on this computer are not configured correctly for Web discovery. MSDN states that this is caused by: This error appears in the Add Web Reference dialog box if you are developing on a machine that is behind a firewall and a proxy server has not been explicitly specified for Internet Explorer connections. You need to explicitly specify the address and port of the proxy server on your network in order to make...
12
3077
by: Paul Tillotson | last post by:
At my company we are looking at deploying clients for our client/server app outside our firewall, which will then require our postgres box to be internet-accessible. Does anyone out there have experience with this or recommended best practices? We have been looking at either (a) tunnelling everything over ssh, or (b) just making sure that users have "strong" passwords and requiring "md5" authentication in pg_hba.conf. Our client app...
7
8836
by: JAG CHAN | last post by:
Friends, As I had written earlier, I am trying to learn Python. I chose IDLE as an editor to learn Python. Now I find that it is an online editor. It is not possible for me to be always on online while learning. Kindly suggest me a suitable editor (for Windows XP) which does not require me to be on online. Regards.
0
263
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 431 open ( +3) / 3425 closed ( +8) / 3856 total (+11) Bugs : 916 open (-23) / 6273 closed (+44) / 7189 total (+21) RFE : 244 open ( +4) / 240 closed ( +1) / 484 total ( +5) New / Reopened Patches ______________________
6
5251
by: John (Z R) L | last post by:
Hi all, I am very new to programming, and I chose to study the Python language before C++. I am currently using the Wikibooks "Non-Programmer's Tutorial for Python", and am up to the section "Who goes there"? http://en.wikibooks.org/wiki/Non-Programmer%27s_Tutorial_for_Python/Who_Goes_There%3F But after clicking "run module" for " a = 1
0
9376
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9234
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8028
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6678
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5994
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4501
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3207
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2146
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.