All of lore.kernel.org
 help / color / mirror / Atom feed
* Hooking on L4 Level with process information
@ 2017-08-29  2:04 Ravish Kumar
  2017-08-29  3:19 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Ravish Kumar @ 2017-08-29  2:04 UTC (permalink / raw)
  To: Networking

Hi,

I want to hook tcp/udp packets on L4 Layer and based on process
information , content want to deny or allow packets.

Netfilter provides pre/post Routing hooks but not sure that will be
right place so thought of asking whether my approach is right.
Also how i can get process information whether this packet is send by
this process.

Thoughts /source code reference would be appreciated.

Regards,
Ravish

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Hooking on L4 Level with process information
  2017-08-29  2:04 Hooking on L4 Level with process information Ravish Kumar
@ 2017-08-29  3:19 ` Stephen Hemminger
  2017-08-29  3:36   ` Ravish Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2017-08-29  3:19 UTC (permalink / raw)
  To: Ravish Kumar; +Cc: Networking

On Tue, 29 Aug 2017 07:34:51 +0530
Ravish Kumar <ravishk2004@gmail.com> wrote:

> Hi,
> 
> I want to hook tcp/udp packets on L4 Layer and based on process
> information , content want to deny or allow packets.
> 
> Netfilter provides pre/post Routing hooks but not sure that will be
> right place so thought of asking whether my approach is right.
> Also how i can get process information whether this packet is send by
> this process.
> 
> Thoughts /source code reference would be appreciated.
> 
> Regards,
> Ravish

There is not a 1:1 relationship between sockets/files and processes.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Hooking on L4 Level with process information
  2017-08-29  3:19 ` Stephen Hemminger
@ 2017-08-29  3:36   ` Ravish Kumar
  0 siblings, 0 replies; 3+ messages in thread
From: Ravish Kumar @ 2017-08-29  3:36 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Networking

Not convinced with this .

A process open a socket and that socket is associated with that
particular process unless it shares the file descriptors.
Can you explain why it is not related , at a time a socket will be
opened by a particular process.

On Tue, Aug 29, 2017 at 8:49 AM, Stephen Hemminger
<stephen@networkplumber.org> wrote:
> On Tue, 29 Aug 2017 07:34:51 +0530
> Ravish Kumar <ravishk2004@gmail.com> wrote:
>
>> Hi,
>>
>> I want to hook tcp/udp packets on L4 Layer and based on process
>> information , content want to deny or allow packets.
>>
>> Netfilter provides pre/post Routing hooks but not sure that will be
>> right place so thought of asking whether my approach is right.
>> Also how i can get process information whether this packet is send by
>> this process.
>>
>> Thoughts /source code reference would be appreciated.
>>
>> Regards,
>> Ravish
>
> There is not a 1:1 relationship between sockets/files and processes.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-29  3:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-29  2:04 Hooking on L4 Level with process information Ravish Kumar
2017-08-29  3:19 ` Stephen Hemminger
2017-08-29  3:36   ` Ravish Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.