Redirect network traffic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys,
I've an openvpn server with two ethernet interfaces, eth0 and eth1.

The network traffic is coming through eth0 interface, and i would like
to redirect all traffic in a specific host (ip address 172.16.1.2)
through eth1 interface.
I'm trying to explain with an example

If i want to ping the host 172.16.1.4, the ping must first pass from
the host 172.16.1.2:

Internet ---> VPN ---> Host1 (172.16.1.2) ---> Host2 (172.16.1.4)

I've tried with these rules:


iptables -t nat -A PREROUTING -p -j DNAT –to-destination 172.16.1.2
iptables -t nat -A POSTROUTING -j MASQUERADE

But, I think that is not correct.
Any ideas?

Thanks in advice,
Regards.
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux