Article 5KKYP Network Filter

Network Filter

by
slipknothoudini
from LinuxQuestions.org on (#5KKYP)
I am trying to write a network filter that will take in traffic and alter things like the destination ip or a destination port effectively redirecting network traffic. In my filter I simply alter the sk_buff. For example (given that socket_buff is the provided sk_buff*:
tcph = tcp_hdr(socket_buff);
tcph->dest = htons(some_port_of_my_choosing);

this does not seem to work. Any tips as to how I might go about doing this would be much appreciated.latest?d=yIl2AUoC8zA latest?i=5jC954zj4yQ:o1M8CnEFzCg:F7zBnMy latest?i=5jC954zj4yQ:o1M8CnEFzCg:V_sGLiP latest?d=qj6IDK7rITs latest?i=5jC954zj4yQ:o1M8CnEFzCg:gIN9vFw5jC954zj4yQ
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments