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

L2TP VPN with Astaro behind NAT

Hi all,

At home I have my Astaro v8 setup as a VM.  The WAN interface of the ASG is an LAN IP behind my D-Link router and the LAN interface of the ASG gives DHCP on a completely separate subnet.  Basically a network in a network.  

Since the ASG's WAN IP is a on my LAN and not the actual Public IP, is there a way I can still VPN using L2TP or SSL VPN to the ASG?  Any forwarding I can do from my D-Link router to the WAN interface of the ASG and then just change the VPN connection IP of the connecting device to the Public IP of my home DSL connection?

Thanks for the help.


This thread was automatically locked due to age.
  • At home I have my Astaro v8 setup as a VM.  The WAN interface of the ASG is an LAN IP behind my D-Link router and the LAN interface of the ASG gives DHCP on a completely separate subnet.  Basically a network in a network.


    Out of interest, what virtualisation solution are you using for this setup?

    Since the ASG's WAN IP is a on my LAN and not the actual Public IP, is there a way I can still VPN using L2TP or SSL VPN to the ASG?


    It should work in theory; you just need to know the LAN IP address, assigned to the 'WAN' interface of the Astaro VM, to forward all the VPN requests to.  The forwarding will need to be carried out on your physical LAN's router, if you're not sure how to do this consult your router's documentation (or ask here, if you're lazy [:)]).

    Any forwarding I can do from my D-Link router to the WAN interface of the ASG and then just change the VPN connection IP of the connecting device to the Public IP of my home DSL connection?


    I see no reason why Astaro shouldn't still assign an IP address from the corresponding VPN IP address pool to the connecting client, for whichever VPN protocol you happen to use at the time, as it would normally.

    Hope this helps.


    Regards,

    Jon.
  • Hi Jon,

    Right now I'm using VMware Player 3.x to run the VM on an XP box with 2 NIC's, one is from my home LAN, the other leads to an Linksys DD-WRT router to give me another WiFi network that I'm using for Dev.  Eventually I'll take  a old SFF P4 box I have and move ASG there but only when I have it working properly in VM.  Restores are much easier.  Was thinking about running XenServer from Citrix and having ASG as a VM along with two or three other VM's I'm trying to setup (NAS, MediaCenter).

    Thanks for the reply.  This morning I tried to setup port forwarding on my D-Link and using browser I was able to connect.  The only problem I had is that the SSL VPN or the iPhone L2TP over IPSec uses the FQDN of my ASG box to connect.  

    I was able to manually changed the connection name to the IP and my custom port for the SSL VPN by editing the config file on my laptop.  However, on the iPhone, I don't have an option to change the port.  I can change the name only.  

    So I'm wondering now about two things.  Is it possible to change the VPN settings on the ASG so that when it installs the client side component, iPhone Cert or SSL VPN config file, to connect by referencing the IP address rather than the FQDN name?  

    Secondly, when I'm using the L2TP, on the iPhone, is it using the standard L2TP port to connect?  I can just forward the real L2TP port to my ASG behind NAT then. Currently I changed the port to something like 45222 which I can't enter on iPhone.

    Thanks again.
  • Is it possible to change the VPN settings on the ASG so that when it installs the client side component, iPhone Cert or SSL VPN config file, to connect by referencing the IP address rather than the FQDN name?


    If it helps at all you can find an option for overriding the hostname for each VPN protocol supported by ASG.  If in 'Remote Access' you go to 'SSL' you'll find under the 'Settings' tab a text box entitled 'Override hostname'.  Also for 'PPTP' and 'L2TP over IPSec' respectively, you'll find the same option under the 'iPhone' tab.  This should be OK on its own for PPTP and L2TP.  As for SSL you need to either download the updated config files from the Astaro once you've changed the hostname, or edit the config files manually to match whatever hostname you've defined.

    Secondly, when I'm using the L2TP, on the iPhone, is it using the standard L2TP port to connect?  I can just forward the real L2TP port to my ASG behind NAT then. Currently I changed the port to something like 45222 which I can't enter on iPhone.


    I'm not an iPhone user myself but I see no reason why it wouldn't use the default port for L2TP like any other L2TP client.  I could be wrong though.  Then again if you want to use a custom port and cannot change it with the iPhone's built-in client, I suppose you could hunt around the App Store and see if there are any more advanced VPN clients matching your requirements.

    Hope this helps.


    Regards,

    Jon.
  • Hi Jon,

    I've been able to change the domain name override field so that it uses IP instead of FQDN for the server field.  The SSL VPN client on the laptop works properly now.  I know I'll have to do some routing and packet filter rules so that the IP I get from the VPN pool to reach my local network services but that should be easy. 

    Currently what I'm trying is to have all the proper VPN ports used for the L2TP IPSec by iPhone to forward directly to the WAN port of my ASG from the D-Link router.  Seems like the forwarding is working fine from the router but I get an error on iPhone that the VPN server did not respond.  Looking at the live log of the VPN on the AS I get this each time I try to connect:

    ---
    2010:11:26-23:05:39 alpha pluto[3802]: ERROR: asynchronous network error report on eth1 for message to 192.168.1.3 port 61112, complainant 192.168.1.3: Connection refused [errno 111, origin ICMP type 3 code 3 (not authenticated)] 
    ---

    192.168.1.3 is the LAN IP of the D-Link router.  Since the traffic is NAT'd in front of the ASG, do I have to look at DNAT or SNAT config for this?  I'm not really clear on how those two work yet though.
  • ---
    2010:11:26-23:05:39 alpha pluto[3802]: ERROR: asynchronous network error report on eth1 for message to 192.168.1.3 port 61112, complainant 192.168.1.3: Connection refused [errno 111, origin ICMP type 3 code 3 (not authenticated)] 
    ---

    192.168.1.3 is the LAN IP of the D-Link router.  Since the traffic is NAT'd in front of the ASG, do I have to look at DNAT or SNAT config for this?  I'm not really clear on how those two work yet though.


    I'm not really sure myself what DNAT or SNAT are, to be honest.  Someone with a bit more networking knowledge will tell you that.  All I can say is to make sure you've entered the correct VPN details on your iPhone (i.e. username, password, server address etc).

    Also have a look at this link which tells you a bit more about the 'ICMP type 3 code 3' entry in your log file.  This may or may not help determine what is going wrong with your connection attempts.
  • Hi, igritsak, and welcome to the User BB!

    It seems like you have a complicated setup.  I'm not sure I understand.
    Internet---[DSL/Cable Modem?]---[Linksys]--LAN--[Astaro]--???

    Please post the lines from the Astaro IPsec log when you attempt an L2TP connection.

    Cheers - Bob
  • Hi Bob,

    Yes, that's pretty much my setup.  

    For the logs below, 192.168.16.3 refers to the LAN IP of the linksys device.  The IP 192.168.20.242 is the WAN IP of the ASG8.  

    -----------------------------
    2010:12:21-16:36:11 alpha pluto[5027]: packet from 192.168.16.3:1023: received Vendor ID payload [RFC 3947]
    2010:12:21-16:36:11 alpha pluto[5027]: packet from 192.168.16.3:1023: ignoring Vendor ID payload [4df37928e9fc4fd1b3262170d515c662]
    2010:12:21-16:36:11 alpha pluto[5027]: packet from 192.168.16.3:1023: ignoring Vendor ID payload [8f8d83826d246b6fc7a8a6a428c11de8]
    2010:12:21-16:36:11 alpha pluto[5027]: packet from 192.168.16.3:1023: ignoring Vendor ID payload [439b59f8ba676c4c7737ae22eab8f582]
    2010:12:21-16:36:11 alpha pluto[5027]: packet from 192.168.16.3:1023: ignoring Vendor ID payload [4d1e0e136deafa34c4f3ea9f02ec7285]
    2010:12:21-16:36:11 alpha pluto[5027]: packet from 192.168.16.3:1023: ignoring Vendor ID payload [80d0bb3def54565ee84645d4c85ce3ee]
    2010:12:21-16:36:11 alpha pluto[5027]: packet from 192.168.16.3:1023: ignoring Vendor ID payload [9909b64eed937c6573de52ace952fa6b]
    2010:12:21-16:36:11 alpha pluto[5027]: packet from 192.168.16.3:1023: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-03]
    2010:12:21-16:36:11 alpha pluto[5027]: packet from 192.168.16.3:1023: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02]
    2010:12:21-16:36:11 alpha pluto[5027]: packet from 192.168.16.3:1023: ignoring Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02_n]
    2010:12:21-16:36:11 alpha pluto[5027]: packet from 192.168.16.3:1023: received Vendor ID payload [Dead Peer Detection]
    2010:12:21-16:36:11 alpha pluto[5027]: "S_REF_SDZfJivAUN"[7] 192.168.16.3:1023 #6: responding to Main Mode from unknown peer 192.168.16.3:1023
    2010:12:21-16:36:11 alpha pluto[5027]: "S_REF_SDZfJivAUN"[7] 192.168.16.3:1023 #6: NAT-Traversal: Result using RFC 3947: both are NATed
    2010:12:21-16:36:11 alpha pluto[5027]: "S_REF_SDZfJivAUN"[7] 192.168.16.3:1023 #6: ignoring informational payload, type IPSEC_INITIAL_CONTACT
    2010:12:21-16:36:11 alpha pluto[5027]: "S_REF_SDZfJivAUN"[7] 192.168.16.3:1023 #6: Peer ID is ID_IPV4_ADDR: '192.168.20.240'
    2010:12:21-16:36:11 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:1023 #6: deleting connection "S_REF_SDZfJivAUN" instance with peer 192.168.16.3 {isakmp=#0/ipsec=#0}
    2010:12:21-16:36:11 alpha pluto[5027]: | NAT-T: new mapping 192.168.16.3:1023/35224)
    2010:12:21-16:36:11 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: sent MR3, ISAKMP SA established
    2010:12:21-16:36:12 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: cannot respond to IPsec SA request because no connection is known for 67.224.91.178/32===192.168.20.242:4500[192.168.20.242]:17/1701...192.168.16.3:35224[192.168.20.240]:17/%any==={192.168.20.240/32}
    2010:12:21-16:36:12 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: sending encrypted notification INVALID_ID_INFORMATION to 192.168.16.3:35224
    2010:12:21-16:36:15 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0xd3ec01fc (perhaps this is a duplicated packet)
    2010:12:21-16:36:15 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: sending encrypted notification INVALID_MESSAGE_ID to 192.168.16.3:35224
    2010:12:21-16:36:18 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0xd3ec01fc (perhaps this is a duplicated packet)
    2010:12:21-16:36:18 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: sending encrypted notification INVALID_MESSAGE_ID to 192.168.16.3:35224
    2010:12:21-16:36:21 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0xd3ec01fc (perhaps this is a duplicated packet)
    2010:12:21-16:36:21 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: sending encrypted notification INVALID_MESSAGE_ID to 192.168.16.3:35224
    2010:12:21-16:36:24 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0xd3ec01fc (perhaps this is a duplicated packet)
    2010:12:21-16:36:24 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: sending encrypted notification INVALID_MESSAGE_ID to 192.168.16.3:35224
    2010:12:21-16:36:27 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0xd3ec01fc (perhaps this is a duplicated packet)
    2010:12:21-16:36:27 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: sending encrypted notification INVALID_MESSAGE_ID to 192.168.16.3:35224
    2010:12:21-16:36:30 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0xd3ec01fc (perhaps this is a duplicated packet)
    2010:12:21-16:36:30 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: sending encrypted notification INVALID_MESSAGE_ID to 192.168.16.3:35224
    2010:12:21-16:36:33 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0xd3ec01fc (perhaps this is a duplicated packet)
    2010:12:21-16:36:33 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: sending encrypted notification INVALID_MESSAGE_ID to 192.168.16.3:35224
    2010:12:21-16:36:36 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0xd3ec01fc (perhaps this is a duplicated packet)
    2010:12:21-16:36:36 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: sending encrypted notification INVALID_MESSAGE_ID to 192.168.16.3:35224
    2010:12:21-16:36:39 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0xd3ec01fc (perhaps this is a duplicated packet)
    2010:12:21-16:36:39 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: sending encrypted notification INVALID_MESSAGE_ID to 192.168.16.3:35224
    2010:12:21-16:36:42 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224 #6: received Delete SA payload: deleting ISAKMP State #6
    2010:12:21-16:36:42 alpha pluto[5027]: "S_REF_SDZfJivAUN"[8] 192.168.16.3:35224: deleting connection "S_REF_SDZfJivAUN" instance with peer 192.168.16.3 {isakmp=#0/ipsec=#0}
    2010:12:21-16:36:42 alpha pluto[5027]: ERROR: asynchronous network error report on eth1 for message to 192.168.16.3 port 35224, complainant 192.168.16.3: Connection refused [errno 111, origin ICMP type 3 code 3 (not authenticated)] 

    ------
  • My tip is you should use SSL VPN. It will work as expected. Do not use L2TP over IPsec (which definetively makes problems in NAT  environments) also not "native" IPsec, which is not easy to bring through the DLink router. Use SSL VPN and forward port 443 to the ASG and it will work.
  • I'm using SSL VPN for my laptop connection but I can only use the L2TP over IPSec for the iPhone's VPN option.  PPTP is not that secure so I'm not using that as an option.  If it wasn't for the iPhone connection I wouldn't have used it.  

    Currently I started testing this at the office as well as a possible replacement for our existing firewall and it's pretty much the same setup where I have WAN -> Firewall Appliance -> LAN -> ASG WAN Port.  Same as home but different box in front and same issue.  I've tried forwarding the ports from the existin appliance to the ASG WAN port and also made sure that the WAN IP of the ASG does not have any restrictions but same error.  

    I'm not sure if it's because it's NAT'd it's having issues resolving something.  Thanks for the help all.