What's new

Advice needed directing external domains to several local servers Asuswrt-Merlin

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

charliebgood

New Around Here
ASUS RT-AC68U
Asuswrt-Merlin v 384.4

I'm sure it is answered somewhere, but I searched and failed to find it a clear answer/example

Issue:
> I manage my domains with my domain register, and have e.g. www.myidea.ca, pics.myidea.ca and docs.example.com pointed at my homeoffice WAN address.

> I want
>> www.myidea.ca to talk to port 80 on internal 192.168.0.203
>> pics.myidea.ca to talk to port 80 on internal 192.168.0.18
>> docs.example.com to talk to port 80 on internal 192.168.0.27

How do I dio this? I don't seem to be able to add port 80 more than 1x in WAN - Virtual Server / Port Forwarding Merlin GUI

Any help most welcome!!
 
How do I dio this? I don't seem to be able to add port 80 more than 1x in WAN - Virtual Server / Port Forwarding Merlin GUI
Can you clarify whether you're accessing these 3 sites from inside your LAN or outside (from the internet).

You can't forward an incoming port (80) to multiple IP addresses. :eek: How would the router know which internal address to send it to!

I think what you really need is a proxy server on your LAN. All incoming traffic on port 80 will be forwarded to the proxy servers internal IP address. Then the proxy server will inspect the HTTP packets an forward them onto the correct server.
 
Last edited:
Thanks ColinTaylor!

Yes, I do want the access from outside (from the internet).

So, yes I need some way to tell somthing that a packet coming into my AsusWRT-Merlin router with address (e.g.) http://pics.myidea.ca/* (from the internet) should be directed to say a Debian VM server on FreeNAS VM at 192.168.0.18, while docs.example.com/* traffic (from the internet) should be routed to, say, 192.168.0.27 (e.g. a NAS w a container running Ubuntu 14 and CKAN)...

I thought that maybe ASUSwrt-merlin and dnsmasq might do the trick... but doesn't seem to.
Proxy server, huh...
 
www.myidea.ca, pics.myidea.ca & docs.example.com are just URL's that all point to the same IP address. As far as the router is concerned it's all just data coming in on port 80.

So yes, you'd need to send that data to a server (proxy) that understands what's inside the packets and redirect it as required. Squid is one such proxy, but (from what I've read) NGINX might be a better choice because it is simple and lightweight.

https://www.nginx.com/resources/wiki/start/topics/recipes/qwebirc/
https://community.spiceworks.com/to...tp-requests-to-different-servers-based-on-url
 
Last edited:
Similar threads

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top