I'm trying to repeat on RouterOS the following Cisco's configration:
using the following configuration, I have connectivity, but few issues exists:interface Tunnel0
ip address negotiated
ip mtu 1400
ip tcp adjust-mss 1360
tunnel source <LOCAL-IP>
tunnel mode ipsec ipv4
tunnel destination <REMOTE-IP>
tunnel protection ipsec profile profile
Code: Select all
## this is my "external" address (got from DHCP)
/ip firewall address-list add address=192.0.2.177 list=local
## this is my LAN
/ip firewall address-list add address=192.168.56.0/24 list=local
/ip ipsec profile add dh-group=modp2048 enc-algorithm=aes-256 hash-algorithm=sha256 name=ike-2k256
/ip ipsec proposal add auth-algorithms=sha256 enc-algorithms=aes-256-gcm pfs-group=modp2048 name=sa-2k256
/ip ipsec proposal set [find default=yes] disabled=yes
/ip ipsec mode-config add name=mc-abitc responder=no use-responder-dns=exclusively src-address-list=local
## excluding LAN traffic from ipsec
/ip ipsec policy add comment="LAN" src-address=192.168.56.0/24 dst-address=192.168.56.0/24 protocol=all action=none
/ip ipsec policy move [find comment=LAN] 0
/ip ipsec policy set [find default=yes] disabled=yes
/ip ipsec policy add template=yes dst-address=0.0.0.0/0 src-address=0.0.0.0/0 proposal=sa-2k256
/ip ipsec peer add address=x.x.x.x exchange-mode=ike2 name=xxx profile=ike-2k256
/ip ipsec identity
add auth-method=eap certificate="" eap-methods=eap-mschapv2 generate-policy=port-strict mode-config=mc-abitc peer=xxx remote-id=fqdn:xxx username=doka password="xxx"
1) Note here no dynamic-address for the peer
2) while VIP address from mode-config (100.100.0.2) received and installed in the NAT rule:[admin@MikroTik] /ip firewall nat> /ip ipsec active-peers print detail
Flags: R - responder, N - natt-peer
0 N id="x.x.x.x" local-address=192.0.2.177 port=4500 remote-address=x.x.x.x port=4500 state=established side=initiator uptime=4m24s last-seen=16s ph2-total=1 spii="37a77a55b607f5fe" spir="1492e5e2a633f26e"
3) policy seems to be what I'm looking for:> /ip firewall nat print
Flags: X - disabled, I - invalid, D - dynamic
0 D ;;; ipsec mode-config
chain=srcnat action=src-nat to-addresses=100.100.0.2 src-address-list=local dst-address-list=!local
Issues are:> /ip ipsec policy print detail
Flags: T - template, B - backup, X - disabled, D - dynamic, I - invalid, A - active, * - default
0 ;;; LAN
peer="" src-address=192.168.56.0/24 src-port=any dst-address=192.168.56.0/24 dst-port=any protocol=all action=none
1 T X* group=default src-address=::/0 dst-address=::/0 protocol=all proposal=default template=yes
2 T group=default src-address=0.0.0.0/0 dst-address=0.0.0.0/0 protocol=all proposal=sa-2k256 template=yes
3 DA peer=xxx tunnel=yes src-address=0.0.0.0/0 src-port=any dst-address=0.0.0.0/0 dst-port=any protocol=all action=encrypt level=unique ipsec-protocols=esp sa-src-address=192.0.2.177 sa-dst-address=x.x.x.x proposal=sa-2k256 ph2-count=1
- since my external IP is DHCPed, it's not permanent and if it will change, this will stop working
- despite routing rules, for some reasons mikrotik don't pass traffic from LAN to outer world (e.g. traceroute 1.1.1.1 from LAN connected PC shows no hops)
Thank you.