Using the mangle packet filter with netfilter and iptables
Hello,
I am trying to alter packets using iptables and netfilter in a c program based off the sample nfqnl_test.c file. In that file, it only showed that packets could be queue’d with the NF_QUEUE target (using the -j switch). I modified the utility to change the packets and then send it off using the nfq_set_verdict with a length and the packet: Code:
return nfq_set_verdict(QueueHandle, id, NF_ACCEPT, len, pktb_data(pkt)); Code:
iptables -A OUTPUT -d <dest ip address> -p udp -j NFQUEUE --queue-num 0 Code:
iptables -t mangle -A INPUT -d <dest ip address> -p udp -j NFQUEUE --queue-num 1 Thanks, Todd |
All times are GMT -5. The time now is 11:05 PM. |