I want to make a program to receive a packet on one network interface do some processing and forward it to a different interface. What can be the most efficient way to do it on Linux? I want to forward the packet with minimum delay
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
libnetfilter_queue.Then write your own program and link with
libnetfilter_queue. After some really simple operations you will be able to userecvto receive packets andnfq_set_verdictto decide what to do with the packet.