Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. firewall

firewall

Scheduled Pinned Locked Moved C#
csharp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shahrokh nabavi
    wrote on last edited by
    #1

    i want to implement a simple software firewall by csharp with ability of filtering ip addresses and blocking som of ports i havent found yet any usefull solution koosha

    C 1 Reply Last reply
    0
    • S shahrokh nabavi

      i want to implement a simple software firewall by csharp with ability of filtering ip addresses and blocking som of ports i havent found yet any usefull solution koosha

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      C# is probably a bit high level for that kind of thing. Usually firewalls are implemented deep in OS. However, a product like WinPKFilter[^] could help as it performs the hooks into the NDIS layer and you can use P/Invoke to process the packets in C#. Does this help?


      "You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar The Second EuroCPian Event will be in Brussels on the 4th of September

      W 1 Reply Last reply
      0
      • C Colin Angus Mackay

        C# is probably a bit high level for that kind of thing. Usually firewalls are implemented deep in OS. However, a product like WinPKFilter[^] could help as it performs the hooks into the NDIS layer and you can use P/Invoke to process the packets in C#. Does this help?


        "You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar The Second EuroCPian Event will be in Brussels on the 4th of September

        W Offline
        W Offline
        walker_net
        wrote on last edited by
        #3

        I think this site maybe lead you to a wonder: Full firewall source code, please visit: http://www.filseclab.com/eng/products/sourcecode.htm.

        C 1 Reply Last reply
        0
        • W walker_net

          I think this site maybe lead you to a wonder: Full firewall source code, please visit: http://www.filseclab.com/eng/products/sourcecode.htm.

          C Offline
          C Offline
          Colin Angus Mackay
          wrote on last edited by
          #4

          How is this much different from using the NDIS Hook code availble in WinPKFilter that I mentioned? The source you site is written in C/C++ and would still require pinvoking for it to work with .NET.


          "You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar The Second EuroCPian Event will be in Brussels on the 4th of September Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way! My Blog

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups