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

Basic DNAT/SNAT question

This is probably obvious to many, but I can't find it after searching this forum and RTFMing. . . [:S]

I have a webserver configured on an IP of my DMZ y.y.y.y.  It's also got an internal NIC on my LAN x.x.x.x.  I can browse both port 80 and port 443 of my webserver from my LAN, and only port 80 (but not 443) using the DMZ address from my LAN.

From the outside WAN z.z.z.z, I can't browse at all.  I've tried setting up a DNAT rule :

Source:  Any
Dest:  my public z.z.z.z address
Service:  HTTP (or Any, I've tried both)
Change Source to:  no change
Change Dest to: my y.y.y.y DMZ address
Service Dest.:  no change.

This doesn't seem to make it work.  I thought maybe I needed to add a packet filter rule but the packet filter livelog shows nothing being dropped.

What do I need to be able to browse this server?

And what additional voodoo, if any, is needed to be able to use SSL on the same dest. port?

TIA

Dan  


This thread was automatically locked due to age.
Parents
  • Hi,
    ---to use your webserver from your LAN with x.x.x.x you dont use the ASL box.
    ---to use your webserver from your LAN with y.y.y.y you have to make a packetfilter-rule for it in your ASL box.
    ---to use your webserver from the web with y.y.y.y you have to make a packetfilter-rule/NAT-rule for incomming, and a NAT-rule for the outgoing packets from your webserver for it in your ASL box.

    firebear   
  • Is it possible that I need a packetfilter rule when my packetfilter logs show no dropped packets?  Doesn't make sense. . .  
  • If SPOOF_DROP appears there is something wrong with you network setup at all!
    Please make sure that your server doesn't have an address which belongs to another
    network attached to a different network interface.

    If you have double checked and you are sure that there is nothing wrong wizh your
    IP settings please send login data to support@astaro.com - to lead 
    this thread to an end [;)]

    read you
    o|iver  
  • With my great thanks to Oliver Desch from Astaro, who logged into my system to see what was wrong, I was setting the whole thing up incorrectly.  Here are the correct steps:

    1)  Under Network/Interfaces, define the public IP address of your server as an additional interface on the hardware that corresponds to your RED eth. interface.  This means that there will be two (or more) legitimate IP addresses on your RED card, but don't worry, this does work.

    2)  Create a DNAT/SNAT rule translating the destination of packets intended for that public IP address to whatever private or DMZ address you intend to use, along with whatever protocols you intend to use (in my case that's HTTPS)

    3)  Create and enable a packet filter rule allowing the appropriate traffic (in my case HTTPS) to hit the internal, private IP address that is the target for the server.

    With these three elements, the server works fine.

    Again my thanks to Oliver   for sorting this out. . .the missing element for me was the missing alias for the public IP address on Red.

    Cheers,

    Dan  
  • What do you mean by RED card?? Is that the one connected to the internet? 
  • What if you do have a dynamic public address?  
  • By RED I'm merely referring to the WAN, or unprotected public side of the firewall.  The RED interface is the one that receives incoming traffic from the outside world, and has a public IP address.  
  •   Poster: uzweifel
    Subject: Re: Basic DNAT/SNAT question--SOLVED!  

    What if you do have a dynamic public address?  
     
     

    I don't think DNAT/SNAT would work if  you have a dynamic IP address, but I also don't think it matters.  The purpose for DNAT/SNAT is to provide masking of a specific outside IP address to an internal one, and that outside IP address can only be hit by the public if it's a static address.  In other words, you can't host a web page on a dynamic IP address for the simple reason that there's no consistent place for the users out on the "net" to request web information.

    Masquerading, on the other hand, is very useful with a dynamic IP.  This is what allows your multiple computers on your (internal) LAN to share the dynamic internet connection that is your dialup, cable, or DSL connection.  But again, it's not going to help for people trying to access content that you are hosting, because there's no single place (that is, static IP) they can go to seek it.

    Hope this makes sense; feel free to post a further question if you need to.

    Dan  
  • Am i wrong now or what's about DNS? DNS (AFAIK) would resolve this problem.  
  • DNS can only refer a user to an IP if the DNS has an entry to do so, and if that DNS itself is fixed (has a fixed IP).  AFAIK, there is no DNS provided by an ISP that will give an up-to-the-minute answer to the question "what dynamic IP address has Joe Blow been assigned this time?".  And you can't run your own DNS to answer this question unless you have a static IP address for that DNS. . .and even then, with a dynamic IP it couldn't get the correct info populated to the other DNSs of the net in anything like a timely manner.

    Besides, a dynamic IP is assigned when you make a request to connect. . .by definition that means you're not always truly connected to the network (this is how PPPOE works).  Therefore, if I wanted to access your server and you didn't happen to be online at the moment, I'd be SOL regardless of whether the DNS could give me an address or not.

    So no, I don't think DNS will help you on this front.  Bottom line, if you want to host content, you need a static IP.   
  • The answer for Dynamic DNS is (for example) www.dyndns.org
    This Service will provide you a dns entry with a dynamic ip address. I am doing this at home quite successful. With this configuration i'm running Apache (and other Services like Mercury-Mailserver and War-FTP) on my 'kitchen server'.

    I'm connected with ADSL to the internet and i think this is handled by PPPoE. But my Provider is not cutting the line, so i'm 'permanently' connected.

    so back to my question: how can i use a HTTP-Server with ASL and dynamic IP?   
  • Well, I apologize for my ignorance that such a thing was possible.  That said, as I look at the DNAT/SNAT settings, it looks to me like they'll accept any named network or network range you've set up in your definitions.  So for example, if you define an IP range as whatever the range of addresses from which your dynamic IP can be assigned, and give it a name (say, RedIP), you should then be able to use that range as the destination for a DNAT/SNAT rule.

    But that's all theory, since I don't have a dynamic set-up with which to experiment.  Try it and let us know what happens!

    Cheers,  Dan  
Reply
  • Well, I apologize for my ignorance that such a thing was possible.  That said, as I look at the DNAT/SNAT settings, it looks to me like they'll accept any named network or network range you've set up in your definitions.  So for example, if you define an IP range as whatever the range of addresses from which your dynamic IP can be assigned, and give it a name (say, RedIP), you should then be able to use that range as the destination for a DNAT/SNAT rule.

    But that's all theory, since I don't have a dynamic set-up with which to experiment.  Try it and let us know what happens!

    Cheers,  Dan  
Children
No Data