CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2006
    Posts
    16

    Question Firewall that blocks single packets?

    Im trying to find a firewall that blocks packet-wise as oppose to program-wise...

    I've used Sygate Personal Firewall bf: http://pcworld.com/downloads/file_de...id,8132,00.asp
    ... as well as others... but whenever u try to block a single packet, it ends up blocking the whole program (maybe I don't know how to use it properly?)

    Does such a firewall even exist?
    I guess there are forums better suited for this discussion... sorry for being a lazy bum...

    Oh btw: firewall --> preferably free

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Firewall that blocks single packets?

    ZoneAlarm can block certain ports, as can other firewalls. How would it know which packet to block, if it wasn't on a certain port, or used by a single program?
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Feb 2006
    Posts
    16

    Re: Firewall that blocks single packets?

    I just want to block a specific packet/s used by a program (without blocking the whole program)

    Is there a firewall that is able to do this?
    I did some searching at download.com of popular firewalls... yield no results

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Firewall that blocks single packets?

    Explain what you are trying to do or block. Is it your app that you want to block? Are packets coming in on different ports? Maybe Winsock could examine packets and reject certain criteria, but that might slow things down.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Feb 2006
    Posts
    16

    Re: Firewall that blocks single packets?

    I don't really want to get into too much detail of what im trying to do...

    For example --> using MSN Messenger:
    - I see packets coming in/out
    - If I was to block just one of these packets (as oppose to the whole program)... would that in effect block one of my contacts?
    - Maybe I could somehow block a specific ip without affecting the whole program

    Obviously this is a stupid example coz in Messenger u can just block/delete your contacts
    ... but hypothetically speaking is the above, possibe with a firewall?

    The criteria thing smells like potential but unfortunately as u can see I don't know much about firewalls... so could u give me an overview/guide on how it works?

    As I mention bf I don't want to reveal too much... and merely experimenting with 'something'...
    Last edited by SomE; February 19th, 2006 at 11:35 PM.

  6. #6
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Firewall that blocks single packets?

    Download a packet sniffer, and take a look at what comes and goes thru a LAN port. Firewalls don't examine packets, they just block ports All programs use specific ports. If you block the port, you block the whole app.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  7. #7
    Join Date
    Feb 2006
    Posts
    16

    Re: Firewall that blocks single packets?

    Thanks alot
    I've found one at pcworld... gonna go try it out... might ask more Q's if I get stuck

  8. #8
    Join Date
    Sep 2000
    Location
    Ottawa, Ontario
    Posts
    356

    Re: Firewall that blocks single packets?

    The best way to accomplish this is to re-direct the applications traffic to a dummy proxy server. Most applications like MSN/IE etc allow you to configure a proxy server. Write a program that will accept connections on 127.0.0.1 : proxyport and forward the connection to the real host : port. The application will be speaking to the server and your "proxy" will act as a "man-in-the-middle" on the data packets.

    If your application doesn't support proxy server then you modify the HOSTS file or your DNS server to supply a fake DNS lookup for that particular server. This way you can re-direct your traffic to the dummy proxy.

    I have done exactly as you are speaking of in the past when I do protocol reverse-engineering. I have a C++ program (i have posted this code as a CodeGuru article that awaitiing publication) that gives you the framework for a proxy server. You can easily modify my project to do what you require.

    during the Send() / Recv() functions you have access to the data streams and you can modifiy or choose not to send that data to the target.

    If you take the packet sniffer route you will be able to see the data but intercepting it and removing it at the socket layer is a big task.
    Last edited by Jean-Guy2000; February 21st, 2006 at 01:21 PM.

  9. #9
    Join Date
    Feb 2006
    Posts
    16

    Re: Firewall that blocks single packets?

    Sorry dude... im lacking in the technical stuff... even though I'm through my 1st year CompSci degree...

    With a packet sniffer I can't tell which packet is for which app... so it isn't any use to someone like me
    Does your program determine this?

    Maybe I should wait a few years... like when I actually know these stuff?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured