Find the answer to your Linux question:
Results 1 to 3 of 3
hi, i m trying to develop an application to block packets(using c++)(like a firewall). i have tried pcap library , but it doesnot block packet just captures them. can anybody ...
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    12

    how to block packets

    hi,
    i m trying to develop an application to block packets(using c++)(like a firewall).
    i have tried pcap library , but it doesnot block packet just captures them.

    can anybody please suggest some solution to it !!

    thanks in advance.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,976
    I'm not 100% certain, but I think you will need a kernel module to support this capability in a user-space program. I assume you don't mean just eating them (open socket/port and consume all incoming data), but more of a filtering capability. There may be a TCP/IP filtering function you can use that will do this already, but I'm not familiar with it if it exists.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Mar 2009
    Posts
    12

    just filtering

    Quote Originally Posted by Rubberman View Post
    I'm not 100% certain, but I think you will need a kernel module to support this capability in a user-space program. I assume you don't mean just eating them (open socket/port and consume all incoming data), but more of a filtering capability. There may be a TCP/IP filtering function you can use that will do this already, but I'm not familiar with it if it exists.
    yes, definitely no consuming but filtering based on contents of the packet.
    and if kernel module is required , then do u know which one it is ??

Posting Permissions

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