F5F Stay Refreshed Power Users Networks Specify routing rules using hostnames to guide traffic effectively.

Specify routing rules using hostnames to guide traffic effectively.

Specify routing rules using hostnames to guide traffic effectively.

D
Dr_Bull
Junior Member
7
04-28-2023, 03:12 AM
#1
Picture two servers connected to the same network through one internet link. You'd like both to run on the same port—say 443—to avoid extra configuration. Both point to the identical public IP address via the same domain names. On an OpenWRT router, you can set up a forwarding rule that checks the domain and routes traffic accordingly. Even with TLS/HTTPS encryption, the router can still detect the domain and forward the connection to the right server.
D
Dr_Bull
04-28-2023, 03:12 AM #1

Picture two servers connected to the same network through one internet link. You'd like both to run on the same port—say 443—to avoid extra configuration. Both point to the identical public IP address via the same domain names. On an OpenWRT router, you can set up a forwarding rule that checks the domain and routes traffic accordingly. Even with TLS/HTTPS encryption, the router can still detect the domain and forward the connection to the right server.

B
Brudora
Senior Member
726
04-28-2023, 05:22 AM
#2
It's feasible. The simplest approach involves deploying a web server (Apache, nginx) on the router, using two virtual hosts. These forward the requests to internal servers. The HTTP part of the domain isn't secured. For example, with nginx you'd include multiple server blocks, each targeting its respective domain. The "location" directive sends incoming traffic to the internal service. In essence, nginx functions as a reverse proxy and SSL endpoint.
B
Brudora
04-28-2023, 05:22 AM #2

It's feasible. The simplest approach involves deploying a web server (Apache, nginx) on the router, using two virtual hosts. These forward the requests to internal servers. The HTTP part of the domain isn't secured. For example, with nginx you'd include multiple server blocks, each targeting its respective domain. The "location" directive sends incoming traffic to the internal service. In essence, nginx functions as a reverse proxy and SSL endpoint.