routing differnt subdomains to different ips on the internal network while using same external ip

routing differnt subdomains to different ips on the internal network while using same external ip

routing differnt subdomains to different ips on the internal network while using same external ip
routing differnt subdomains to different ips on the internal network while using same external ip
3 weeks ago - last edited a week ago

what i want to know if its possible

i have an single external ip

all subdomains point to it

but i want the router if possible to rout it to different internal ip based on the originating subdomain

for example :

exemple/com to 192/168/5/20

mail/exemple/com to 192/168/10/20

1/exemple/com to 192/168/5/25

2/exemple/com to 192/168/5/30

 

something like that is possible ?

 

 

dots in the ips and domains was replaced by / becose site complained of iligal links

  0      
  0      
#1
Options
1 Accepted Solution
Re:routing differnt subdomains to different ips on the internal network while using same external ip-Solution
a week ago - last edited a week ago

1. The core concept

A router alone cannot distinguish subdomains — NAT/port forwarding only works on port numbers, not hostnames.
To route based on subdomain, you need an HTTP reverse proxy on one internal host.

2. Steps to set it up

✅ Step 1: DNS setup

All your subdomains point to the same public IP.

Step 2: Router configuration

Forward ports:

  • TCP 80 → 192.168.1.10:80

  • TCP 443 → 192.168.1.10:443

(That’s the reverse proxy’s internal IP.)

✅ Step 3: Reverse proxy configuration

On the internal host (192.168.1.10), install a reverse proxy like:

  • Nginx

  • Caddy (simplest for automatic HTTPS)

  • Traefik (great for Docker setups)

  • Apache (m

  • HAProxy

  •  

    Step 4: HTT

  • Use Let’s E orCaddy to automatic

  •  

 

Recommended Solution
  1  
  1  
#6
Options
5 Reply
Re:routing differnt subdomains to different ips on the internal network while using same external ip
2 weeks ago

  @Mnetnet 

Thank you for your post. Unfortunately, this requirement cannot be implemented on our router. You may want to seek assistance elsewhere.

  0  
  0  
#2
Options
Re:routing differnt subdomains to different ips on the internal network while using same external ip
2 weeks ago - last edited a week ago

  @Ethan-TP 

is there any chance policy routing will be able to do it in the future based on originating domain ?

  0  
  0  
#3
Options
Re:routing differnt subdomains to different ips on the internal network while using same external ip
a week ago

  @Mnetnet 

I will forward your request to the relevant team, and they will evaluate it.

  0  
  0  
#4
Options
Re:routing differnt subdomains to different ips on the internal network while using same external ip
a week ago

  @Ethan-TP 

Thank you

  0  
  0  
#5
Options
Re:routing differnt subdomains to different ips on the internal network while using same external ip-Solution
a week ago - last edited a week ago

1. The core concept

A router alone cannot distinguish subdomains — NAT/port forwarding only works on port numbers, not hostnames.
To route based on subdomain, you need an HTTP reverse proxy on one internal host.

2. Steps to set it up

✅ Step 1: DNS setup

All your subdomains point to the same public IP.

Step 2: Router configuration

Forward ports:

  • TCP 80 → 192.168.1.10:80

  • TCP 443 → 192.168.1.10:443

(That’s the reverse proxy’s internal IP.)

✅ Step 3: Reverse proxy configuration

On the internal host (192.168.1.10), install a reverse proxy like:

  • Nginx

  • Caddy (simplest for automatic HTTPS)

  • Traefik (great for Docker setups)

  • Apache (m

  • HAProxy

  •  

    Step 4: HTT

  • Use Let’s E orCaddy to automatic

  •  

 

Recommended Solution
  1  
  1  
#6
Options