[ale] iptables redirect

Christoper Fowler cfowler at outpostsentinel.com
Sun Nov 23 20:36:41 EST 2008


I've moved a server to a new colo and I want to redirect services from
the first colo to the second until the DNS change takes full effect.

Here is what I've done.

*[root at demo tomcat]# ifconfig eth0:2 209.168.246.236
[root at demo tomcat]# iptables -t nat -A PREROUTING -d 209.168.246.236/32  
-i eth0 -p tcp --dport 5000 -j DNAT --to-destination 65.254.217.214:5000


[root at demo tomcat]# iptables -L -n -t nat
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination        
REDIRECT   tcp  --  0.0.0.0/0            209.168.246.234     tcp dpt:80 
redir ports 5000
DNAT       tcp  --  0.0.0.0/0            209.168.246.236     tcp 
dpt:5000 to:65.254.217.214:5000

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination      *  

It is not working.  If I telnet 209.168.246.236 5000 from my desktop
it seems to never conenct.  Just times out.  Can someone tell me
what I did wrong?

Thanks,
Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20081123/2bf3106b/attachment.html 


More information about the Ale mailing list