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   
Reply
  • 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   
Children
  • Is it possible that I need a packetfilter rule when my packetfilter logs show no dropped packets?  Doesn't make sense. . .  
  • the NAT looks fine! I think the Problem isn´t on the ASL, because if you didn´t made a rule like "Any    {http}  webserver   allow" and you don´t see anything in the Logfiles something is wrong. Your Packets do not arrive the extern Interface of your ASL.

    For Test make a rule like "Any    http    webserver  Log drop". If you don´t see anything yet, look other things first...

    I hope this helps

    Sorry for my bad english

    Basty  
  • Tried that rule (sounded like a good idea) but no dice.  "Any webserver any log drop" doesn't even drop my pings.

    Now I hooked up my laptop to a switch on my WAN side and gave it another IP address in that public space(z.z.z.a).  Can't ping my z.z.z.z address, tho I can ping z.z.z.b which is the ASL's own WAN port.

    So to summarize:

    with a DNAT rule from z.z.z.z to y.y.y.y I can ping y.y.y.y from LAN x.x.x.x, but not from another WAN ip address.

    I can also access ports 80 & 443 thru my web browser (Apache server) by hitting the y.y.y.y address from my LAN, but not from WAN.

    No packets lost in packet log.  Whatever's happening, it's not being blocked by packet filtering.

    And I know it's not my server (as opposed to firewall) that's causing the problem, because when I take the NIC off of the DMZ and plug it into a switch on the WAN and just let it be exposed to the world (well, with IPChains blocking all but 80 and 443)  [;)]t works flawlessly.

    So upshot is, something's not working on the DNAT/SNAT or (what I think is more likely) there's a step I'm missing or getting wrong.  Therefore I request again:

      Will someone who has actually done it successfully, please post a step-by-step (assume the reader knows nothing) guide for enabling a server on the DMZ to be served by a public IP address of the WAN?  

    Thanks

    Dan  
  • Did You have put a packet filter rule
    Any HTTP webserver allow
    before any other drop rule?  
  • I have tried one, it doesn't make any difference.  Nor would I expect it to, as there are no packets showing dropped in the packet filter log.  
  • HELLO ASTARO????

    Some documentation from the authorities would be awfully nice here. . .the manual has nothing useful!  
  • Hi Dan, got your private message.  Hell you know about as much as me on this [:)]

    To get servers working from outside normally I just create a packet rule to allow the traffic and a SNAT/DNAT rule to forward to the internal network.

    Have you created a masq rule for the DMZ ?  That would probably help.

    Your initial NAT rule looks good.
    Any port 80 traffic to external IP, forward to web server inside. Dont change source address. Dont change service, just change destination.

    Unfortunately for you I have a whole Class C public address for my DMZ so don't need to mess with SNAT/DNAT.
     
  • Dan,
    I just tested to my internal LAN with IIS 5.0

    Created a packet filter to allow port 80 traffic from Red to InternalIP
    Created a SNAT/DNAT rule to forward port 80 traffic to Red to the internal web server IP.

    And it works.

    (Try Any Any Any Allow for testing).

    Maybe your install is corrupted ?  I've had weird stuff happen once before, packet filters and some definitions were not working as expected.  Backed up config and reinstalled ASL and restored config fixed it.

     
  • Simon,

    Will you try another experiment for me?  'Cause I tried what you said, and it works for me too, but it's not (quite) what I wanted to do. . . [:(]

    Being the nervous little dog that I am,   , I really don't want to have my firewall's Red port accept   ANY  traffic from the outside world. . .that is, for a webserver I want the IP to be one of the other ones I legally own in my public space, but to simply tell ASL that it should never, under any circumstances, accept any traffic originating from the outside world and intended for its own IP address.

    Therefore, what I wanted to do, was to create a DNAT rule that translated that other public IP address into my webserver's address (and put it on the DMZ eventually, not the LAN).  Problem is, though the incoming traffic works just fine, the webserver's responses are then slammed by ASL as IP-spoofed packets and never get out the door.  And that seems to be something over which I have no control.

    So how can one use ASL to route multiple legitimate public IP addresses (in the same subnet)?  Do I change my DMZ's IP space to be the rest of my /27?  I thought (and am now configured this way) that the DMZ should be another private IP space and only use DNAT/SNAT to provide the public IPs as necessary. . .but obviously this isn't working. . . [:S]

    Thanks for answering; for some odd reason ASL personnel seem unwilling to join this discussion. 

    Dan  
  • I think I understand what you are saying.

    Your "normal" fw red interface is say 1.2.3.4
    You want to add a public IP to the interface ?
    so Red = 1.2.3.4 AND 5.6.7.8 ?

    Then use 5.6.7.8 for web server ?

    This should work...

    I have private LAN address 192.168.X.X
    I have a Class C block I use for DMZ (203.11.69.X)

    I have also put some of those Class C addresses on my Red interface for remote access to machines on my LAN so I can use terminal services to do remote admin.  These use DNAT rules to forward to my private IP's and seems to work fine.

    Normally though, web servers/mail servers etc etc use public IP's in my DMZ so there is no requirement to have people accessing my firewalls red interface.

    Only time traffic gets to red interface specifically is when I am using terminal services and I have these packet filtered so I can only do remote access from certain IP's.

    ASL Staff are slow to respond sometimes.  Not sure if this is because they are busy, the questions are from people who haven't paid for a license or whatever....
    Sure is frustrating sometimes though when your stuck and you're sure that 20 seconds of attention from an ASL staff member would probably solve something you've been driven crazy over for 24 hours or longer....

    I'm still trying to get MSN working through firewall but I doubt it will ever happen till SIP/uPnP comes in, (And I think ASL stated they will never support uPnP) [:(]

    If you are a paid up license holder, try emailing support direct ?  Shame those responses/questions don't get posted here or to a knowledge base...

    A decent searchable knowledge base would be excellant.