Linux Netfilter discussions
 help / color / mirror / Atom feed
* netfilter + perl payload mangling in userspace
@ 2009-07-27  3:57 Trixter aka Bret McDanel
  2009-07-27 15:44 ` Michael Mefford
  0 siblings, 1 reply; 2+ messages in thread
From: Trixter aka Bret McDanel @ 2009-07-27  3:57 UTC (permalink / raw)
  To: netfilter

I wanted to modify the payload of packets in userspace, preferably with
perl.  I have tried to google to find something, encountered some dead
links.  I have not be able to get the example Net::Divert to work,
however it appears that I am not able to divert properly.  I cant find
any working examples of how to do the iptables command to divert.  

Is there any other way to modify the payload of a packet from userspace,
preferably with perl?

can someone provide me with a working example of how to do iptables to
divert?


I have iptables 1.4.1.1 on eeebuntu (ubuntu base) and a kernel of 2.6.27

Thank you
-- 
Trixter http://www.0xdecafbad.com     Bret McDanel
pgp key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8AE5C721



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

* Re: netfilter + perl payload mangling in userspace
  2009-07-27  3:57 netfilter + perl payload mangling in userspace Trixter aka Bret McDanel
@ 2009-07-27 15:44 ` Michael Mefford
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Mefford @ 2009-07-27 15:44 UTC (permalink / raw)
  To: trixter; +Cc: netfilter

Trixter aka Bret McDanel wrote:
> I wanted to modify the payload of packets in userspace, preferably with
> perl.  I have tried to google to find something, encountered some dead
> links.  I have not be able to get the example Net::Divert to work,
> however it appears that I am not able to divert properly.  I cant find
> any working examples of how to do the iptables command to divert.  
>
> Is there any other way to modify the payload of a packet from userspace,
> preferably with perl?
>
> can someone provide me with a working example of how to do iptables to
> divert?
>
>
> I have iptables 1.4.1.1 on eeebuntu (ubuntu base) and a kernel of 2.6.27
>
> Thank you
>   

Have you tried using NFQUEUE?  The queue is provided to 'queue' packets 
for userspace processing.  To use the queue, you'll need the 
libnetfilter_queue API.  Start here:

http://www.netfilter.org/projects/libnetfilter_queue/index.html

If you need more help, let me know.


Michael.


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

end of thread, other threads:[~2009-07-27 15:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-27  3:57 netfilter + perl payload mangling in userspace Trixter aka Bret McDanel
2009-07-27 15:44 ` Michael Mefford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox