Results 1 to 2 of 2

Thread: Port forwarding based on request uri/domain

  1. #1
    Join Date
    Aug 2008
    Location
    Sweden
    Beans
    249
    Distro
    Ubuntu 12.04 Precise Pangolin

    Arrow Port forwarding based on request uri/domain

    Hey. I've been googling for how to set up (if it's even possible) a port redirect based on the request uri or requested domain name.

    So if someone request the domain www.domain.com:80, my first server will redirect this to the local ip 192.168.100.15:80, but if the request is phpmyadmin.domain.com:80, the request goes first to my external ip, as usual. But internally that will be forwarded to 192.168.100.92:80 instead of 192.168.100.15:80.

    Or if someone might request domain.com:336 that could be port forwarded to 192.168.100.45:1166.

    (This is just sample ports and domains, to illustrate what I want)

    I want this because my ISP won't provide static external ip-s.

    Cheers,
    Artheus
    Last edited by artheus; December 2nd, 2010 at 10:19 AM. Reason: elucidating
    Ubuntu server ed. 12.04 x64

  2. #2
    Join Date
    Aug 2008
    Location
    Sweden
    Beans
    249
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Port forwarding based on request uri/domain

    I've seen that I could use mod_proxy for the port 80. But my worry is other ports for eg. FTP, VPN, Mail etc.
    I have got several servers hosting different things, And I'm going to move, and when I move I have to change ISP. So there won't be static IP's no more.

    Hoping for fast answers.

    Cheers,
    Artheus
    Ubuntu server ed. 12.04 x64

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •