1

In C++ UDP Socket port multiplexing, I found that using DNAT PREROUTING, I can redirect the packets for a particular UDP port and listen to packets being received on it.

iptables -t nat -A PREROUTING -i <iface> -p <proto> --dport <dport>
    -j REDIRECT --to-port <newport>

Unfortunately this works ONLY for packets received at this port. How can I get the packets being sent from this port?

4

0 回答 0