-1

Possible Duplicate:
Is there a way to forward a port based on subdomain?

wOk here is what I need to do:

Listen on various ports and route to LAN IP addresses based on url and port.

So I have a number of domain names assigned to the same IP address and I need to redirect based on url–

Server1.domain.com:5902 --> 192.168.0.100:5902 Server2.domain.com:5902 --> 192.168.0.101:5902 Server1.domain.com:23 --> 192.168.0.110:23 Server2.domain.com:23 --> 192.168.0.111:23

I have an IIS server that does this kind of thing fine for http stuff but other ports are bupkis.

Can this be done sith squid or iptables or ????

Mike
  • 1
  • Err.. are you looking to do HTTP 30x responses for VNC and Telnet traffic? That would be less than successful. – Shane Madden Nov 23 '11 at 01:21
  • This has been asked many times already: http://serverfault.com/questions/121112/hostname-based-port-forwarding or http://serverfault.com/questions/255055/dynamic-port-forwarding-based-on-hostname-or-originating-ip just to name two of them – Mark Henderson Nov 23 '11 at 01:36

1 Answers1

2

The short answer is no. Only HTTP provides a reliable way to know the name of the host the client was trying to reach.

David Schwartz
  • 31,215
  • 2
  • 53
  • 82