i am facing issues as it does not connect. Here is my setup.
site A (server)
-pppoe to the ITSP and it has an ip>cloud. i am giving a fake one for security reasons.
-It has 2 different VLANs 172.16.5.1/24 and 10.0.0.1/24 on different ports.
config:
[i]/interface bridge
add name=bridge1
add name=bridge2
add name=loopback
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 name=pppoe-out1 \
password= service-name=otenet use-peer-dns=yes user=\
whatever@isp.net
/interface gre
add local-address=192.168.99.1 name=gre-tunnel1 remote-address=192.168.99.2
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip ipsec mode-config
add address=192.168.99.2 address-prefix-length=32 name=ike2-gre \
split-include=192.168.99.1/32 system-dns=no
/ip ipsec policy group
add name=ike2-gre
/ip ipsec profile
add dh-group=ecp256,modp2048,modp1024 enc-algorithm=aes-256,aes-192,aes-128 \
name=ike2
/ip ipsec peer
add exchange-mode=ike2 name=ike2 passive=yes profile=ike2
/ip ipsec proposal
add auth-algorithms="" enc-algorithms=aes-128-gcm name=ike2-gre pfs-group=\
none
/ip pool
add name=dhcp_pool0 ranges=172.16.5.150-172.16.5.199
add name=pool2 ranges=10.0.0.100-10.0.0.149
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=bridge1 name=dhcp1
add address-pool=pool2 disabled=no interface=bridge2 name=dhcp2
/interface bridge port
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge2 interface=ether4
add bridge=bridge2 interface=ether5
/ip address
add address=172.16.5.1/24 interface=bridge1 network=172.16.5.0
add address=10.0.0.1/24 interface=bridge2 network=10.0.0.0
add address=192.168.99.1 interface=loopback network=192.168.99.1
add address=172.16.1.1/30 interface=gre-tunnel1 network=172.16.1.0
/ip cloud
set ddns-enabled=yes ddns-update-interval=11m
/ip dhcp-server network
add address=10.0.0.0/24 dns-server=8.8.8.8,9.9.9.9 gateway=10.0.0.1
add address=172.16.5.0/24 dns-server=8.8.8.8,9.9.9.9 gateway=172.16.5.1
/ip firewall filter
add action=accept chain=input comment="allow L2TP VPN (ipsec-esp)" \
in-interface=pppoe-out1 protocol=ipsec-esp
add action=accept chain=input comment="allow L2TP VPN (500,4500,1701/udp)" \
dst-port=500,1701,4500 in-interface=pppoe-out1 protocol=udp
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
/ip firewall nat
add action=masquerade chain=srcnat out-interface=pppoe-out1
/ip ipsec identity
# Suggestion to use stronger pre-shared key or different authentication method
add generate-policy=port-strict mode-config=ike2-gre peer=ike2 \
policy-template-group=ike2-gre secret=test
/ip ipsec policy
add dst-address=192.168.99.2/32 group=ike2-gre proposal=ike2-gre src-address=\
192.168.99.1/32 template=yes
/ip route
add distance=1 dst-address=10.1.202.0/24 gateway=172.16.1.2
add distance=1 dst-address=192.168.2.0/24 gateway=172.16.1.2
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Europe/London
[/i]
site B (client)
-eth1 has the IP 192.168.2.202/24
-eth2 has the IP 192.168.2.202/24
[i]/interface gre
add local-address=192.168.99.2 name=gre-tunnel1 remote-address=192.168.99.1
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip ipsec mode-config
add name=ike2-gre responder=no
/ip ipsec policy group
add name=ike2-gre
/ip ipsec profile
add dh-group=ecp256 enc-algorithm=aes-256 name=ike2-gre
/ip ipsec peer
add address=3xyz12302bncvgatux.sn.mynetname.net exchange-mode=ike2 name=p1.ez \
profile=ike2-gre
/ip ipsec proposal
add auth-algorithms="" enc-algorithms=aes-128-gcm name=ike2-gre pfs-group=\
none
/ip address
add address=192.168.1.202/24 interface=ether1 network=192.168.1.0
add address=192.168.2.202/24 interface=ether2 network=192.168.2.0
add address=172.16.1.2/30 interface=gre-tunnel1 network=172.16.1.0
/ip dhcp-client
add disabled=no interface=ether1
/ip ipsec identity
# Suggestion to use stronger pre-shared key or different authentication method
add generate-policy=port-strict mode-config=ike2-gre peer=p1.ez \
policy-template-group=ike2-gre secret=test
/ip ipsec policy
add dst-address=192.168.99.1/32 group=ike2-gre proposal=ike2-gre src-address=\
192.168.99.2/32 template=yes
/ip route
add distance=1 dst-address=10.1.101.0/24 gateway=172.16.1.1
/system identity
set name=siteB[/i]
i cannot get it connected