routing differnt subdomains to different ips on the internal network while using same external ip
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
- Copy Link
- Subscribe
- Bookmark
- Report Inappropriate Content
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
-
- Copy Link
- Report Inappropriate Content
Thank you for your post. Unfortunately, this requirement cannot be implemented on our router. You may want to seek assistance elsewhere.
- Copy Link
- Report Inappropriate Content
is there any chance policy routing will be able to do it in the future based on originating domain ?
- Copy Link
- Report Inappropriate Content
I will forward your request to the relevant team, and they will evaluate it.
- Copy Link
- Report Inappropriate Content
Thank you
- Copy Link
- Report Inappropriate Content
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
-
- Copy Link
- Report Inappropriate Content
Information
Helpful: 0
Views: 156
Replies: 5
Voters 0
No one has voted for it yet.
