Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have an NFQUEUE, for IPv6 packets hooked to PREROUTING chain of mangle table in ip6tables. Once I receive a packet in user application, I modified the header. Infact, modified the header from IPv4 to IPv6 and reinjected the packet. But, from the logs, I see that the IPv4 packet is being treated like an IPv6 packet.

  1. Since each NFQUEUE is mapped to either AF_INET or AF_INET6, is it possible for a single NFQUEUE to handle both IPv4 and IPv6 packets?

  2. Is it possible to receive the packet from one queue but inject in a different queue? It doesn't make sense but I would like to inject a packet to the IP stack directly with the IP header formatted in userspace.

    • It is not advisable to use raw sockets with IPv6 as per RFC 3542.
    • I am not able to use TUN device for performance issues. Lot of packets are being dropped with TUN devices.
share|improve this question
Please do not cross-post to multiple Stack Exchange sites. – Michael Hampton Feb 19 at 17:36

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.