Recieve and forward all packets to another port
Posted
by
question
on Stack Overflow
See other posts from Stack Overflow
or by question
Published on 2010-12-21T15:44:31Z
Indexed on
2010/12/21
15:54 UTC
Read the original article
Hit count: 178
iptables
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
© Stack Overflow or respective owner