Hi,
is it possible to configure IPSec/L2TP VPN, when the Mikrotik router is behind NAT, but it is reachable by FQDN (all protocols and ports)?
I tried to add the hostname to my-id-user-fqdn field in ipsec peer configuration, but it still doesn’t work.
L2TP/IPSec AC is behind NAT. Client is not an issue (I’m running the same config on another sites where Mikrotik is the gateway with public IP and it works fine regardless of whether a client is behind NAT).
I need to make VPN to Mikrotik gateway, which has private IP, all traffic to it is routed based on its FQDN. So it’s reachable from internet, but not by IP, but only by FQDN.
I also tried to setup PPTP VPN to it and it works, so it’s kinda strange for me why L2TP/IPSec not…
IPSec will NOT work when the AC is behind NAT. As soon as you involve IPSec, the iniciator can be behind NAT, but the responder (the AC) has to have a public IP.
I’d suppose that Microsoft is doing some trick to make it work. But I can assure you that I connect to several Windows 2003 Servers which are behind NAT (and I’m also behind a NAT)
A value of 2 configures Windows so that it can establish security associations when both the server and the Windows Vista-based or Windows Server 2008-based VPN client computer are behind NAT devices.
Oh yeah, with other vendors it can work, Cisco’s IPSec works with the AC being behind NAT as well.
They dont include the IP header src and dst addresses and a few more things into the IPSec checksum calculations, and therefore the packet doesnt go invalid when processes by the IPSec process.
With Mikrotik tho, I dont know of any way how to make it work.
I have two Mikrotik devices, x86 and RB1100AHX2 that currently use IPSEC Tunnel mode both behind Cisco Firewalls and using nat at both ends.
So it can be done with mikrotik ROS 6.3 in tunnel mode.
I’m still working on solving the transport mode option.
The policy sa-src-address should be the local outbound address before nat, and the sa-dst-address should be the firewall address that will be natted.
Nat traversal is set.
I call 213.56.122.xxx from a road-warrior PC using PPTP mschapv2 and VPN works fine.
I try and try using L2TP with IPSec server on mkt and I must have something wrong or it is not posible, it fails on IPSec negotiaion.
It creates:
a Dinamic policy in IP SEC:
src-address=“Remote IP Public Address” src-port=any dst-address=213.56.122.xxx
dst-port=any protocol=all action=encrypt level=require
ipsec-protocols=esp tunnel=NO sa-src-address==“Remote IP Public Address”
sa-dst-address=213.56.122.xxx proposal=default priority=2
Remote Peers:
Local Address: 192.168.1.220
Remote Address:=“Remote IP Public Address”
Side: Responder
Established: in time…
Installed SA:
Src Address: :=“Remote IP Public Address”
Dst Address: 192.168.1.220
…
i just want to know if its still not possible to have both sides behind a nat when you use L2TP/IPSEC with mikrotik, or is there now a possibility to create such a VPN-Connection.
I have seen that there are some changes on it lately (f.e. IPSEC Checkbox on L2TP Server)
Quite old discussion , but I had the same problem , no way to make MT L2TP/IPSEC AC behind a nat , because the policy is created using public ip addresses, while SA are installed using MT AC WAN IP (but it is a private one anyway behind a NAT)
If you manually create a policy with MT WAN IP as source and remote client public ip (but it changes frequently , so useless) L2TP/IPSEC works like a charm !!!
Cisco does it , Microsoft does it, other brands do it,
I don’t know why Mikrotik cannot implement a way to create a dynamic policy with routerboard WAN interface IP as source for incoming L2TP/IPSEC (or 0.0.0.0/0) requests.
Is it impossible or not enough required by many to be implemented ??
Any answer from MT staff please ??
thank you very much.
P.S. It seems to me , the same issue is present when securing a GRE tunnel between MT devices both end behind a NAT -and- one of two with dynamic ISP ip address:
Again, when a policy is created dynamically by MT device behind NAT it uses wrong parameters thus fails.
With both static ISP address no problems as the policies are created manually the right way.
Also interested in this, as my Mikrotik is behind NAT! I have no other choice as I am required to do PPPoE by my ISP and this consumes too many resources on the Mikrotik. In order to achieve the maximum line speeds (this is a symmetric 300mbps connection), I need to put in the ISP router in between to do PPPoE take this load off the Mikrotik server… Therefore, the Mikrotik ends up behind NAT.
It would be a bit ridiculous that we can achieve this by redirecting the L2TP/IPSec ports in the Mikrotik to a Linux or Windows server in the LAN, behind NAT, but we can’t do this directly on the Mikrotik.
Is it an xDSL connection ?
I have no experience but I don’t think PPPoE client inside MT machine takes so much resources once PPPoE connection is established…
In one of my installations I have to do so, configure a cisco router as a straigth dsl modem (ATM and ethernet bridged together) and leave routerboard to do the PPPoE job in order to achieve the REAL public ip address right on the mikrotik WAN interface.
Other ISPs here furnish their own DSL router capable of telephone lines built-in as VoIP in their devices , so you loose this feature if router is replaced, all I can do is a transparent nat without any L2TP possibility if public IP is dynamic