I am very new to IPsec config and also to Mikrotik products. I want to achieve site to site tunnel between our HQ Palo Alto firewall and Mikrotik for our new branch office. Also i need tunnel interfaces on the both sides for OSPF which I will set later. Tunnel is established and it is ok, but the problem is that I need access to two different subnets from Mikrotik. I have these subnets:
10.0.0.0/11 - This is HQ LAN which is agregated.
10.255.128.0/30 - Point to point network inside tunnel between Palo Alto and Mikrotik.
(10.32.0.0/19 - Branch office LAN. )
So I created two IPsec policies (they are set in tunnel mode, because Palo Alto does not support transport mode):
With one policy all works great. With two policies there is a problem. When Mikrotik initialize connection, tunnel is failing. When initialization from Mikrotik side is disabled, tunnel is created successfully, but when I try to ping to some IP from subnets configured in policies, there is packet loss above 50%. It seems that half of whole time works first policy and next half second policy.
It is interesting that from Palo Alto side there is no need to specify some policy rules and everything works. When I tried to setup one policy with src-address: 0.0.0.0/0 dst-address: 0.0.0.0/0, these rules had more priority than routes and everything was routed through tunnel interface. I not sure which behavior is better by the standards.
I am working here on an IPSEC s2s setup with Palo Alto and Mikrotik CHR.
It would help to understand both sides setup.
In the PA side you can use the default PH1 and PH2 IKEv2 and IPSEC profiles.
** EDIT ** For most use cases you will need to set on the PA side the IKE Gateway side “Peer IP Address Type” to Dynamic.
Take a peek at: Palo Alto: Getting Started: VPN Palo Alto: IPSec VPN Tunnel with Peer Having Dynamic IP Address
Before starting with the setup config you must know that to reach each end you must be inside the LAN segment of the NETWORK.
To ping from the Mikrotik towards the tunnel with the local ip address you can use something like:
What you described is state very similar to what I have, but thanks to you, I have clarified a few details. My original question about multiple policies is solved, I forgot to set proxy IDs on Palo side.
But what if I want the tunnel interface also on the Mikrotik side as well? My original goal was to have two OSPF routers and automatic route propagation of Mikrotik LAN networks to potential next OSPF node. I have currently set the IPIP interface, but Mikrotik overlooks it. I’ve filled both public IP addresses and local IP from p2p subnet, but all routes via this interface are marked as inactive. I have read a lot of topics about it, so do I understand right, that Mikrotik does not support route based IPsec VPN (so I can’t force IPsec to use any tunnel interface)?
The basic config of a GRE tunnel between PA and MT would be a bit different from MT to MT.
With MT to MT the IPSec tunnel would be negotiated with the PSK defined in the GRE configuration.
With PA and MT I assume that you would be required to to create another tunnel ontop of the IKE and the ipsec tunnel.
On the MT create a bridge interface with an ip address such as 192.168.199.1/32.
(Alternatively you can use the MT LAN ip address like 192.168.0.1/32 )
Then on the ipsec policies on both sides of the PA and the MT allow/accept only from 192.168.199.1/32 to 192.168.99.1/32 and vice versa on the PA.
In the PA create a static route to 192.168.199.1/32 via the 192.168.99.1 address on the ipsec tunnel.
After this create a GRE tunnel from 192.168.99.1 to 192.168.199.1 on the PA And on the MT.
IE the MT GRE tunnel would be from 192.168.199.1 to 192.168.99.1 .
Then you can add addresses to the GRE tunnel itself like a 192.168.200.1/30 on the MT and 192.168.200.2/30 on the PA.
Once you have these configured you could probably do anything with OSPF.
From what I know PA 9.0 doesn’t have support for IPIP tunnels.
I have seen that PA has a “Add GRE Encapsulation” checkbox however I have not tried to use it but I believe it would work with some vendors.
Not sure if MT GRE with IPsec PSK would work with it.
An example for VyOS an PA IPSEC and GRE cli configuraion might help to configure the PA side of via cli instead of WEBUI: VyOS: GRE/IPsec VyOS: VTI with Palo Alto
Hi, I am certainly sure, that you cannot make s2s VPN with same networks. You also cannot connect same networks to router…
[quote=randhir18 post_id=852772 time=1618222884 user_id=154820]
I have 2 mikrotik router .one is rb4011 and second one is rb3011 .both are different location. I want to configure vpn between router..But local Ip is same in both location.how to configure???
[/quote]