Recieve and forward all packets to another port
- by question
Debian 5, iptables
Server N1
Some video-streaming server without external IP.
Server N2
Debian server with ip 1.1.1.1.
Server N1 is configured to send videostream to 1.1.1.1:1111.
How to forward all recieved packages from 1.1.1.1:1111 to another port on the same server, for example to 1.1.1.1:2222?
Something like that?
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 1111 -j REDIRECT --to-port 2222