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.
  •   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