Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to know if I can configure DD-WRT router, that operates as the server's network gateway, so support different forwards based on hostname (other than port 80).

I've configured successfully Varnish and it's used to forward all requests to the backend web servers and also have the following port forwarding logic:

143, 25 (web) -> 143, 25 (192.168.1.10) 80 (web) -> 80 (192.168.1.11) ...

I would like to know if I can configure, as an additional rule, for a single domain, such as: if hostname is "domainX.com" then port 25 should go to another server, otherwise, all port 25 requests will go to the default mail server.

PS: If there's no efficient way, I'll setup a port forwarding and firewall dedicated server.

Thanks!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Yes you can do this; you'll need the Pound add-on.

WHAT POUND IS:

  1. a reverse-proxy: it passes requests from client browsers to one or more back-end servers.
  2. a load balancer: it will distribute the requests from the client browsers among several back-end servers, while keeping session information.
  3. an SSL wrapper: Pound will decrypt HTTPS requests from client browsers and pass them as plain HTTP to the back-end servers.
  4. an HTTP/HTTPS sanitizer: Pound will verify requests for correctness and accept only well-formed ones.
  5. a fail over-server: should a back-end server fail, Pound will take note of the fact and stop passing requests to it until it recovers.
  6. a request redirector: requests may be distributed among servers according to the requested URL.

From Wikipedia:

Pound is a lightweight open source reverse proxy program suitable to be used as a web server load balancing solution... Using regular expression matching on the requested URLs, Pound can pass different kinds of requests to different backend server groups.

Pound home page.

share|improve this answer
    
Brilliant! Thanks for the tip. I've been using optware with an external USB drive, but never knew that you can setup a reverse proxy on the actual device. –  narcis Mar 3 '13 at 10:46
    
When you say Pound add-on, it seems like Pound is an add-on for DD-WRT, but it's not, right? It's just a stand-alone app. I need name-based forwarding to multiple IP/names too, and with DD-WRT, I can't seem to figure out how to do it. –  SAFX May 16 '13 at 23:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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