-5

I must route all traffic from first server to second server and next to third server.

Like this: server1 -> server2 -> server3

I use Debian Wheezy. Can anyone tell how to do this with iproute?

MarcinM
  • 1
  • 1

1 Answers1

1

If you want to route all trafic from a machine to another you can use iptables to match on a port:

   echo "1" > /proc/sys/net/ipv4/ip_forward
   iptables -t nat -A PREROUTING -p tcp --dport 1111 -j DNAT --to-destination 2.2.2.2:1111
   iptables -t nat -A POSTROUTING -j MASQUERADE
Thomas L.
  • 181
  • 1
  • 1
  • 5