LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   portforwarding with iptables (https://www.linuxquestions.org/questions/linux-security-4/portforwarding-with-iptables-580394/)

muhammednavas 08-28-2007 07:56 AM

portforwarding with iptables
 
hi
i have two webservers running my Lan. letus say server1 & server 2
i have forwarded port 80 to my server1 with iptables.
here my question is if my server1 down then server2 should take the requests.
how can i add this with iptables???

win32sux 08-28-2007 12:49 PM

You'd need a program that periodically checks if server1 is up, and executes the appropriate iptables rule (changing the port forward toward server2) if it finds that it is down. If you search LQ you'll probably find several examples of ping scripts that will execute stuff conditionally. I actually remember one specific script posted by gbonvehi a couple years ago as a possible solution for someone's very similar needs.


All times are GMT -5. The time now is 01:57 PM.