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

DNAT Madness

We have an ASG120 between our Cable internet connection and our internal network (Masquaraded).

Going OUT from the internal network works no problem. I've checked a few features (blocking certain sites etc) and they work fine, but I want to enable ssh access to a server from outside our network, and eventually HTTP to a webserver.

Despite following the knowledgebase article 239708 to the letter, I am never forwarded to the server on our internal network. I continually time out.

My DNAT rule is as follows:
Name: SSH to Server
Traffic Source: Any
Traffic Service: SSH
Traffic Destination: External(Address)
NAT Mode: DNAT (Destination)
Destination: Main Server (established in Definitions)
Destination Service: SSH
Auto Packet Filter: unchecked

In Packet Filter I have a rule:
Position: Bottom
Source: External(Address)
Service: SSH
Destination: Main Server
Action: Allow

Both DNAT and Packet Filter rule are enabled, however, it still times out.

However, if i disable the DNAT rule, I can ssh into the Astaro box itself.

Am I missing the obvious here?

Many thanks,
Grant


This thread was automatically locked due to age.
  • sorry, diagram should look like this

    default g/w --internet 1---|========|-----internal net 1
    --------------------------|= Astaro =|-----internal net 2
    internet 2-----------------|========|----internal net 3 ----- host 1
  • sorry, diagram should look like this

    default g/w --internet 1---|========|-----internal net 1
    --------------------------|= Astaro =|-----internal net 2
    internet 2-----------------|========|----internal net 3 ----- host 1


    Hi all, would be real happy to get some help here [:)] I am on the last stage of evaluating Astaro but I am having major problems trying to publish servers as per my diagram above. This is the same whether the boxes have my Astaro firewall as default gateway or not.

    As above, internet 1 is a fast ADSL, this is where I want most of my traffic to go out, this interface has the default gateway set in Astaro, my host 1 when trying to go to the internet goes out here if allowed.

    Internet 2 is a fully routed leased line, this is where all my servers are published to the internet via the firewall. 

    So say for example host 1 is a web server, and I want to make this available to the internet via Internet 2. This is how I see it, can someone tell me if this is the right way ? because while I can get it to work it breaks other things, in particular the "Policy Routes" do not seem to work as advertised.

    I make a DNAT rule

    Traffic Source: Any
    Traffic Service: HTTP
    Traffic Destination: Internet 2

    NAT mode: DNAT

    Destination: Host 1
    Destination Service:HTTP

    On it's own this does not work, from what I can see packets from the internet try to go back out the default gateway of Astaro, ie Internet 1, making this a Full NAT changes nothing unless I am doing it wrong somehow ?

    So, I figured whats needed is a Policy Route

    Route Type: Gateway route
    Source Interface:  Internal Net 3
    Source Network: Host 1

    Service: Any
    Destination Network:Any
    Gateway: The default gateway of Internet 2

    As soon as I enable this rule it works, I can access the web server from outside, so far so good. 

    2 problems, it breaks all ICMP from host 1 to the Internet, not good.
    Secondly, if I change the policy route to say service HTTP, then ICMP works again and goes out internet 1, but the web server is now not accessible from the Internet ?

    I gotta be missing something here it simply cannot be that complex ? I have 4-5 other firewalls here and have set the same thing up many many times on ISA 2000, ISA 2004, Endian, Clark Connect, and many others.

    Any help appreciated, as this is a stumbling block for me right now in my choice of Astaro to replace my current setup.

    Cheers

    Phill
  • If you just want to policy route the http traffic for host 1 out the 2nd internet connection you need to create a new service for the http reply traffic with a source port 80. You may also need to create a SNAT rule for the traffic if you haven't done so already.
  • If you just want to policy route the http traffic for host 1 out the 2nd internet connection you need to create a new service for the http reply traffic with a source port 80. You may also need to create a SNAT rule for the traffic if you haven't done so already.


    Thanks mate, that works [[:)]] Never thought about it that way, that 80 would have to be source port ! So now web traffic goes back out where it should (internet 2), and everything else goes out internet 1. Having said that it seems a lot do to just get a server published, I also split the DNAT and SNAT rules as you suggested on another post. 

    I continue testing and learning [[:)]]

    Cheers

    Phill