python for windows internet filter / firewall

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • thorley@gmail.com

    #1

    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

  • Diez B. Roggisch

    #2
    Re: python for windows internet filter / firewall

    > 2) Is this even reasonable in python and how might I get started? (e.g.[color=blue]
    > win32 COM?)[/color]

    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

    Comment

    • thorley@gmail.com

      #3
      Re: python for windows internet filter / firewall

      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:[color=blue][color=green]
      > > 2) Is this even reasonable in python and how might I get started? (e.g.
      > > win32 COM?)[/color]
      >
      > 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[/color]

      Comment

      • Michele Petrazzo

        #4
        Re: python for windows internet filter / firewall

        thorley@gmail.c om wrote:[color=blue]
        > Greetings,
        >
        > I'm interested in a simple content-based internet firewall/filter,
        > similar to dansguardian (http://dansguardian.org/),[/color]

        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
        [color=blue]
        > but written in python,[/color]

        Of course :)

        and for windows.

        Why? All that work with networking (and not only that) work better with
        *nix OS!
        [color=blue]
        > I assumed such a project would already exist,[/color]

        Firewall I don't think, and the same for the filtering (I know only
        something like a plugin for squid, so for *nix platform).
        [color=blue]
        > 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?)[/color]

        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)
        [color=blue]
        >
        > Thanks much -- matthew
        >[/color]


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

        Bye,
        Michele

        Comment

        • thorley@gmail.com

          #5
          Re: python for windows internet filter / firewall

          Thanks for a detailed reply.
          [color=blue]
          > Firewall and filter are two things totally separated![/color]

          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.
          [color=blue]
          > Take a look at wipfw (wipfw.sf.net) that do what you want[/color]

          Thanks for the tip I'll check it out.
          [color=blue]
          > And for windows. Why? All that work with networking (and not only that) work better with
          > *nix OS![/color]

          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 :(
          [color=blue]
          > win32COM for do what?[/color]

          My knowledge of COM is miniscule, but I assumed it has a low level
          interface for packet filtering.
          [color=blue]
          > 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)[/color]

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

          Thanks again.
          --matthew

          Comment

          • Michele Petrazzo

            #6
            Re: python for windows internet filter / firewall

            thorley@gmail.c om wrote:[color=blue]
            > Thanks for a detailed reply.
            >[/color]

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

            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.
            [color=blue][color=green]
            >> win32COM for do what?[/color]
            >
            > My knowledge of COM is miniscule, but I assumed it has a low level
            > interface for packet filtering.
            >[/color]

            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!
            [color=blue][color=green]
            >> 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)[/color]
            >
            > Proxy would be an easy way, but I wanted to do it at a lower level.
            >[/color]

            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 :)
            [color=blue]
            > Thanks again. --matthew
            >[/color]

            Michele

            Comment

            Working...