iptables

C++ iptables redirection forming separate packets

I have all traffic from port 50 redirected to 5050 using iptables -t nat -A POSTROUTING -p udp --dport 50 -j REDIRECT --to-port 5050 I listen using a RAW Socket on 5050, and I see IP packets from 0.0.0.0:50 to 0.0.0.0:5050. The original destination address is obviously not present, since this seems to be a separate redirection packet...

C++ weird RAW sockets and iptables issue...

With reference to http://stackoverflow.com/questions/3951043/c-iptables-redirection-forming-separate-packets, I am facing an extremely peculiar problem now. I am trying to redirect all incoming traffic on UDP port 5060 to port 56790, and all outgoing traffic from 5060 to the port 56789. I used these iptables rules: iptables -t nat -I PR...

Linux iptables redirect

I am an ISP and I need to suspend with a message the clients who didn't pay. For every web page they acces they have to see " suspended " ( port 80 ) and all the other ports need to be closed. How can I accomplish this ? Thanks. ...

C++ iptables libipq create multiple queues at same time

How can I create two different ip_queues, running at the same time? One of it can listen for incoming packets on one port and another can listen for outgoing packets on the same port. ...