Url based port forward



  • Hi Everyone,

    I have 2 web servers that connected to same network.
    I need that when someone from the outside browse to a.domain.com will be forwarded to web server 1
    and when someone browse to b.domain.com will be forwarded to web server 2

    both of them using 2 different internal IPs
    and the port for both servers should be 80.

    is it possible to do that with pfsense?

    Thanks! :)

    Mr.Fw



  • No this is not possible with pfSense. (however i'm not sure if one of the available packages can add this functionality).

    But depending on which webserver you're using you might also be able to set up virtual domains and redirect internally from server to server.



  • the problem is that i use 2 different web servers.

    is it not possible to to that somehow with pfsense?
    maybe use some kind of a reverse proxy?


  • Rebel Alliance Developer Netgate

    I think the HAProxy package can do this, but it still has some rough edges.



  • you should go check out nginx.
    it is about the most simple reverse proxy in existance and it works beautifully.

    all you have to do is forward port 80 to nginx, create route rules based on the domain name to internal servers and done. it can offload any ssl processing as well, it can also reverse proxy folders, so you could have domin.com go to your webserver and domain.com/download go to your fileserver farm, etc etc.
    easiest thing to do is run in in VM like ESXi, takes little to no resources and is fast.



  • This should be solvable without anything fancy.  Each website is on its own unique IP?  Set up DNS and 1:1 NAT.  Problem solved.



  • @submicron:

    This should be solvable without anything fancy.  Each website is on its own unique IP?  Set up DNS and 1:1 NAT.  Problem solved.

    each website has its own unique internal ip,
    but externally they're sharing one WAN ip.

    Thanks  ;)



  • modsecurity package can do this.



  • Hi everyone,

    its been a while..

    anyway, i've installed the "modsecurity" package and this is what i get:

    **Forbidden

    You don't have permission to access /index.php on this server.**

    nothing else was changed except for the package installation.

    even after reboot - still the same.

    please help me,
    my dmz is offline  ???



  • I've been having pretty much the same damned issue.

    Its a shame seeing that something like this is not integrated tightly with PFsense as a firewall, that would make PFsense insanely awesome.


Locked