Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am building an iptables-based gateway that will route traffic from the WAN to two different servers on the LAN. One server is using name-based virtual hosting for two websites, and the other will be running one or more websites in the future. If the gateway has only one WAN IP address, is there some way for iptables to route incoming traffic based on the "Host" HTTP header? If not, is there a way to go about doing this?
You cannot solve this problem below the application layer, since a TCP connection needs to be opened to the correct web server even before any application data (e.g. the "Host:" header) is sent. Look in the direction of reverse proxies for a possible solution. Welcome to LinuxQuestions.
Thanks for your help. I looked up "reverse proxy" on Wikipedia, and there seem to be a lot of choices. Can anyone recommend one? Load balancing might be needed in the future.
Thanks for your help. I looked up "reverse proxy" on Wikipedia, and there seem to be a lot of choices. Can anyone recommend one? Load balancing might be needed in the future.
well i did something like this i have two virtual hosts running on a single box listening on ips 40000 and 40002 on the firewall which has 1 wan interface , i did a portforwarding using iptables,something like this
So if I were setting this up with a reverse proxy, would iptables need to route incoming traffic to the proxy or to the destination interface? Does the proxy intercept traffic going onto the LAN, or does the traffic need to be directed there? Also, would iptables need to be set up somehow to route traffic from the proxy to the LAN?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.