Timothy Gene Llewellynn wrote:
> I trying to setup a complex routing situation. What I need to be able to
> do is route/foward incoming http/1.1 requests based on the domain name
> in the http header. For example if a connection to my machine ip A comes
> in on port 80 and the domain header is B1 then the request gets
> forwarded to a machine IP C1, but if the domain is B2 then the request
> gets forwarded to ip C2.
>
> My router is currently redhat 6.1running kernel 2.2-14 with ipmasq.
>
> Does anyone have any suggestions on how to do this?
You can't do it at the IP layer (IOW, it's not a "routing" issue).
You would need to do it at the HTTP layer (e.g. by configuring an HTTP
daemon to forward the request to the appropriate server).
What you are proposing is similar to ip_masq_ftp.o, which:
a) doesn't actually work at the IP layer; it examines the payload,
which (at the IP layer) is just arbitrary data.
b) doesn't work in general; if the "PORT" command is split across
packet boundaries (which is perfectly legal), it fails.
c) has a much easier task; FTP "PORT" commands almost invariably occur
at the beginning of a packet, whilst HTTP "Host:" headers generally
don't (if they do, it's coincidence).
--
Glynn Clements <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]