This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

dns name http and port forwarding

I "believe" i have a valid solution in mind for my problem, however i wanted to see if I could get any additional input before moving forward.

THE ISSUE

I have a streaming media server (media-01) from which I generate a number of different media streams on unique ports and mountpoints.

I.E.
Windows Media (MMS, HTTP, RTSP) - multiple mountpoints
Shoutcast Streams (port 8000, 8002, 8004, etc.)
etc.

While this works correctly from the server side of things I want to be able to send ALL streams out to clients over Port 80 to avoid firewall issues.

In the past the way that I would have accomplished this with Astaro would be to take a unique IP address for each stream and write a DNAT rule to listen on WAN port 80, forward to LAN media-01 local LAN port for that specific stream.

I would now like to take advantage of Astaro's v8 Web Application Firewall to solve this issue with the use of only a single IP address.  

The following post had provided some of the initial thought on this;

https://community.sophos.com/products/unified-threat-management/astaroorg/f/55/t/44631

THE SOLUTION?

** example of streaming multiple shoutcast streams over Port 80 using a single public IP address

WAN IP x.x.x.100 (public IP)
LAN IP 10.0.0.20 (media-01)

FQDN DNS
Stream 1     stream1.domain.com
Stream 2     stream2.domain.com

Web Application Security --> Web Application Firewall

Setup "real web servers"

 * name:  realWebServer01
 * host:  media-01
 * type:  Plain (HTTP)
 * Port:  8000

 * name:  realWebServer02
 * host:  media-01
 * type:  Plain (HTTP)
 * Port:  8002
 
Setup 'virtual web servers"

 * name:  virtualWebServer01
 * Type:  Plain (HTTP)
 * Domains:  stream1.domain.com
 * Interface:  WAN IP x.x.x.100
 * Port:  80
 * Pass Port Header:  checked
 * Real Web Servers:  realWebServer01

 * name:  virtualWebServer02
 * Type:  Plain (HTTP)
 * Domains:  stream2.domain.com
 * Interface:  WAN IP x.x.x.100
 * Port:  80
 * Pass Port Header:  checked
 * Real Web Servers:  realWebServer02

What I believe would happen with this configuration is that the WAN IP address would be listening on Port 80 and based on the virtualWebServer which was invoked (based on the domain), it would the communicate with the real web server (the same server in both cases in this example) on the specific Port indicated.

Does this seem correct, or is there a problem that I'm missing here?

Thanks

Ryan


This thread was automatically locked due to age.
Parents
  • That's the way I understand it, but I haven't done it yet.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • I set up the ASG as indicated to test and unfortunately it does not work exactly as expected.

    The ASG WAF will correctly identify the incoming request by domain (virtual server) and correctly pass the request to the (real server) and on the correct port as indicated in the real web server.

    The issue appears to be that the external client who made the original request is then connecting to the real web server on the specified port of the real web server as opposed to the virtual servers port.

    The example I setup was this;

    WAN IP x.x.x.105

    Virtual Web Server listening on WAN IP Port 80 - domain stream1.domain.com

    Real Web Server - host media-01 - communicate on Port 8000


    When external browser makes a request for stream1.domain.com the ASG take the request and the external browser is connected to media-01 on Port 8000, not on Port 80.

    If I set up a standard DNAT rule instead and forward requests on that WAN IP to the same server with a service forward to port 8000 the external client browser still gets there but they are on port 80 as the service forward is hidden.

    I have tested this both scenarios running a NETSTAT from the external browser and it appears that is the case, although I may be doing something wrong.

    So while the WAF is great to utilize a single WAN IP address to manage redirects to different internal resources it does not appear to also work as a service port forward like can be done with DNAT rules.

    If someone knows of a way this can be done or something that has to be set up in addition please post it here and I'll try that.

    Thanks

    Ryan
Reply
  • I set up the ASG as indicated to test and unfortunately it does not work exactly as expected.

    The ASG WAF will correctly identify the incoming request by domain (virtual server) and correctly pass the request to the (real server) and on the correct port as indicated in the real web server.

    The issue appears to be that the external client who made the original request is then connecting to the real web server on the specified port of the real web server as opposed to the virtual servers port.

    The example I setup was this;

    WAN IP x.x.x.105

    Virtual Web Server listening on WAN IP Port 80 - domain stream1.domain.com

    Real Web Server - host media-01 - communicate on Port 8000


    When external browser makes a request for stream1.domain.com the ASG take the request and the external browser is connected to media-01 on Port 8000, not on Port 80.

    If I set up a standard DNAT rule instead and forward requests on that WAN IP to the same server with a service forward to port 8000 the external client browser still gets there but they are on port 80 as the service forward is hidden.

    I have tested this both scenarios running a NETSTAT from the external browser and it appears that is the case, although I may be doing something wrong.

    So while the WAF is great to utilize a single WAN IP address to manage redirects to different internal resources it does not appear to also work as a service port forward like can be done with DNAT rules.

    If someone knows of a way this can be done or something that has to be set up in addition please post it here and I'll try that.

    Thanks

    Ryan
Children
No Data