I've been reading docs for iptables for a week now, and still can't figure out how to do what I want to do. Here it is :
I have a firewall (one public interface, one private interface.) with 3 web servers behind it, I want the servers on a private subnet, say 192.168.0.2, 192.168.0.3,192.168.0.4.
All three servers have different hostname, and I have sufficient public IPs to handle them.
I need to set the firewall so that when it gets a request for www1.domain.com it forwards to 192.168.0.2, www2.domain.com goes to 192.168.0.3, and so on.
Can someone come up with a sample iptables script for me please ?