Guest User!

You are not Sophos Staff.

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

SSL VPN question - is there possible to use NAT?

Here's a problem that cracks my mind recently.
I've successfuly managed to connect from the subnet (Internal) to one of the SSL-VPN clients.
Now I have the following setup:
-there is a VPN client with static VPN IP, say 10.0.13.37; client uses a link with dynamic address, which doesn't work with dyndns (3G broadband link - client is hidden behind several NATs); it is possible for the client to use an alternative uplink, also modile broadband;
-client is connected to ASG via SSL-VPN; wether the client is accessible from Internal network depends on the rules on firewall;
-ASG works on a link with a static IP, multiple firewall rules, multiple NATs, etc, everything works as desired;
---
Up to this point everything works OK.
---
The goal is:
-to have 2 ports, say 80 and 22, NATed, so everyone connecting to the ASG's external IP on port 22 gets redirected to client's interface; in other words the goal is to allow remote SSH connections to the client.

I've failed with this task, I have simply no idea on what to do.
Client connects correctly to the ASG, gets it's desired IP (mentioned above), client is accessible from Internal subnet according to the firewall rules.

Does anyone of you have any idea on how to achieve this?
Thanks in advance.


This thread was automatically locked due to age.
Parents
  • You problem is likely that the client doesn't know that the incoming IP comign through the DNAT is supposed to be routed back out through the Sophos/Astaro gateway.

    Under Remote Access ->  SSL -> Global -> Local Networks you would likely need to put Any to get the client routing ALL Internet bound traffic through the tunnel.  Else, you can do a Full NAT instead of a DNAT for 80 and 22 that changes the source to something that is covered by an entry in that Local Networks field aforementioned.
Reply
  • You problem is likely that the client doesn't know that the incoming IP comign through the DNAT is supposed to be routed back out through the Sophos/Astaro gateway.

    Under Remote Access ->  SSL -> Global -> Local Networks you would likely need to put Any to get the client routing ALL Internet bound traffic through the tunnel.  Else, you can do a Full NAT instead of a DNAT for 80 and 22 that changes the source to something that is covered by an entry in that Local Networks field aforementioned.
Children
  • Some thoughts...

    If you DNAT all incoming port 22 traffic, you won't be able to allow Support to connect via SSH to your device.  If this is a home unit, that's not an issue.
    (...)
    I'm a bit confused as to why you would want to use a DNAT for someone connected via VPN.  A VPN can be configured to allow connections with internal devices - no NATting should be required.
    Cheers - Bob


    The reason is simple: my internet uplink is a mobile broadband, so my home router is hidden behind several provider's masquerades. This doesn't allow me to access my home network from outside.
    A close friend has got an uplink with public IP, and he runs an ASG there.
    The reason why do I need such a weird NAT is that I require remote access to my home automation, for some reasons critical for me.

    (...)
    Under Remote Access ->  SSL -> Global -> Local Networks you would likely need to put Any to get the client routing ALL Internet bound traffic through the tunnel.(...)


    Thank you, both of you. I'll check this in a few hours, then I shall post the results.
  • Update:
    I've just done a fresh config.
    The config is as follows:
    On ASG: I've set "all" in allowed SSL networks, I've put a temporary "any to any" rule in firewall.

    Ifconfig on a linux box (the one I need to have access to) shows:
    tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
              inet addr:10.242.2.6  P-t-P:10.242.2.5  Mask:255.255.255.255
    which is OK.

    ASG successfully pings the box on shown IP.

    The box pings ASG's internal IP, or machines in the Internal network.

    There is a DNAT set on ASG: traffic to External on port 22 goes to [username (user network)].

    Nmap shows port 22 as filtered, SSH doesn't connect.

    With FullNAT it works in the same way, mean it doesn't work.

    The only difference between my setup and the default one is that I've managed to make an autoconnect script.