Thanks sindy for your answers.
Unfortunately adding rules has no effect
Something is wrong, but have no idea what.
The TP-link router have LTE card, so it's possible that the mobile provider have NAT between our router and Internet.
I have called provider and they told me that there is NAT from LTE to Internet - is it possible to create IPsec site-to-site in this case?
If yes please look below.
I put firewall rules for this connectoion on the first positions, but still not working.
Below I put all configuration involved in this communication, maybe You will find a bug or misconfiguration.
/ip ipsec policy print
Flags: T - template, X - disabled, D - dynamic, I - invalid, A - active,
-
- default
0 T * group=default src-address=::/0 dst-address=::/0 protocol=all
proposal=default template=yes
3 T ;;; Template for MyConnection
group=connection src-address=::/0 dst-address=::/0 protocol=all
proposal=Connection template=yes
4 DA src-address=192.1.10.0/23 src-port=any dst-address=10.186.224.0/24
dst-port=any protocol=all action=encrypt level=unique ipsec-protocols=esp
tunnel=yes sa-src-address=hhh.hhh.hhh.hhh sa-dst-address=ccc.ccc.ccc.ccc
proposal=Connection ph2-count=1
/ip ipsec peer print
Flags: X - disabled, D - dynamic, R - responder
2 R ;;; for MyConnection
;;; Unsafe configuration, suggestion to use certificates
address=0.0.0.0/0 auth-method=pre-shared-key secret="MY_KEY"
generate-policy=port-override policy-template-group=connection
exchange-mode=aggressive send-initial-contact=yes nat-traversal=yes
proposal-check=obey hash-algorithm=sha1 enc-algorithm=aes-128
dh-group=modp1024 lifetime=1h dpd-interval=disable-dpd
/ip ipsec proposal print
Flags: X - disabled, * - default
0 * name="default" auth-algorithms=sha1
enc-algorithms=aes-256-cbc,aes-192-cbc,aes-128-cbc,3des lifetime=30m
pfs-group=none
2 name="Connection" auth-algorithms=sha1 enc-algorithms=aes-128-cbc lifetime=1h
pfs-group=modp1024
/ip ipsec installed-sa print
Flags: H - hw-aead, A - AH, E - ESP
2 HE spi=0x5529AE8 src-address=ccc.ccc.ccc.ccc dst-address=hhh.hhh.hhh.hhh state=mature auth-algorithm=sha1
enc-algorithm=aes-cbc enc-key-size=128 auth-key="d38c5d34d0e350b117559b3bbbeec3cb568b"
enc-key="751d2e64936b25b09604263328f1" addtime=jul/05/2018 09:43:01 expires-in=45m18s add-lifetime=48m/1h
current-bytes=848 current-packets=8 replay=128
3 HE spi=0xDA3B870 src-address=hhh.hhh.hhh.hhh dst-address=ccc.ccc.ccc.ccc state=mature auth-algorithm=sha1
enc-algorithm=aes-cbc enc-key-size=128 auth-key="8c34ee6569a91a28ec651a1564fba5b05c90"
enc-key="f33dc25b8228e3b66e9181197049" addtime=jul/05/2018 09:43:01 expires-in=45m18s add-lifetime=48m/1h
current-bytes=616 current-packets=7 replay=128
that's all from IPSec part
The firewall part
/ip firewall filter print
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; Allow for MyConnection
chain=input action=accept tcp-flags="" protocol=ipsec-esp src-address=10.186.224.0/24 dst-address=192.1.10.0/23
log=yes log-prefix="Allow for MyConnection"
1 ;;; Allow for MyConnection
chain=input action=accept tcp-flags="" protocol=ipsec-esp src-address=192.1.10.0/23 dst-address=10.186.224.0/24
log=yes log-prefix="Allow for MyConnection"
/ip firewall nat print
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; allow MyConnection
chain=srcnat action=accept src-address=10.186.224.0/24 dst-address=192.1.10.0/23 log=yes log-prefix=""
1 ;;; allow MyConnection
chain=srcnat action=accept src-address=192.1.10.0/23 dst-address=10.186.224.0/24 log=yes log-prefix=""
4 chain=srcnat action=masquerade out-interface=ether1 log=no log-prefix=""
I was also trying something with Raw
/ip firewall raw print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=prerouting action=notrack log=no log-prefix="" src-address=192.1.10.0/23 dst-address=10.186.224.0/24
1 chain=prerouting action=notrack log=no log-prefix="" src-address=10.186.224.0/24 dst-address=192.1.10.0/23
I was also trying to setup IP tunnel for this connection, but have no idea how to put destination dynamic address
, so I put local network IP
/interface ipip print
Flags: X - disabled, R - running, D - dynamic
NAME MTU ACTUAL-MTU LOCAL-ADDRESS REMOTE-ADDRESS KEEPALIVE DSCP
1 R ;;; Tunel for MyConnection
MyConnection-ipip-tunnel1 auto 1480 0.0.0.0 10.184.224.0 inherit
That's all what I have configured to connect with this remote site.
Do you have any idea what to do more?