0

I'm searching for a router that supports port forwarding based on the request header.

e.g. www.domain1.com should forward to port 80 on IP 168.0.1.10 www.domain2.com should forward to port 80 on IP 168.0.1.20 www.domain3.com should forward to port 80 on IP 168.0.1.30 etc...

I've read somewhere that this can be done by using a reverse proxy. However - if it's possible for a router to forward a request based on where the request is coming from, that would be a more simple setup.

I've searched for a router with an option like that, but had no luck finding any.

Maybe because it does not exist, or maybe because I don't know what the "feature" is called so I'm searching for the wrong term?

2
  • Unfortunately, product or resource recommendations are explicitly off-topic, except on Software Recommendations and Hardware Recommendations.
    – Ron Maupin
    Dec 7, 2021 at 13:18
  • Unfortunately there is a chicken and egg problem, in order to get the request header you have to establish the connection, but in order to establish the connection you have to decide where to forward it to. Dec 9, 2021 at 15:10

1 Answer 1

2

What you're looking for is not called a router, but a load balancer or proxy. Routers only look at packet headers, not at payload.

1
  • Or firewall. Most routers have some level of policy based routing, but looking at layer-7 data is often not supported. (routing based on source IP rather than dest.)
    – Ricky
    Dec 7, 2021 at 23:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.