Re: redirection

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

 



On Tue, 8 Apr 2003, Christian Cernuschi wrote:

> i'd like to do this:
> 
> i have 2 pc  
> x.y.z.1
> x.y.z.2
> 
> i would like to redirect connection on port 80 of x.y.z.1 to port 80 of 
> x.y.z.2
> 
> i tried with DNAT but when someone tries to connect it goes in timeout?
> 



iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -d x.y.z.1 -j 
DNAT --to x.y.z.2:80

iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to x.y.z.1



We are doing the *exact* thing you want to do everyday with the above 2 
lines. 


Eric




[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