

Konfigurace MK1...
wan:78.102.108.26
lan: 192.168.2.0/24
MK2:
wan: 83.240.6.140
lan: 192.168.144.0/24
Nastaveni mk1
/ip firewall nat
add chain=srcnat out-interface=01_UPC_internet action=masquerade
/ip ipsec peer
add address=83.240.6.140 port=500 auth-method=pre-shared-key secret="testtest"
/ip ipsec policy
add src-address=192.168.2.0/24 src-port=any dst-address=192.168.144.146.0/24 dst-port=any \
sa-src-address=78.102.108.26 sa-dst-address=83.240.6.140 \
tunnel=yes action=encrypt proposal=default
/ip firewall filter add action=accept \ chain=input dst-port=500 protocol=udp
/ip firewall filter add action=accept \ chain=forward dst-address=192.168.144.146.0/24 src-address=192.168.2.0/24
/ip firewall filter add action=accept \ chain=forward dst-address=192.168.2.0/24 src-address=192.168.144.146.0/24
/ip firewall nat
add chain=srcnat action=accept place-before=0 \
src-address=192.168.2.0/24 dst-address=192.168.144.146.0/24
Nasteveni mk2
/ip firewall nat
add chain=srcnat out-interface=gateway action=masquerade
/ip ipsec peer
add address=78.102.108.26 port=500 auth-method=pre-shared-key secret="testtest"
/ip ipsec policy
add src-address=192.168.144.146.0/24 src-port=any dst-address=192.168.2.0/24 dst-port=any \
sa-src-address=83.240.6.140 sa-dst-address=78.102.108.26 \
tunnel=yes action=encrypt proposal=default
/ip firewall filter add action=accept \ chain=input dst-port=500 protocol=udp
/ip firewall filter add action=accept \ chain=forward dst-address=192.168.144.146.0/24 src-address=192.168.2.0/24
/ip firewall filter add action=accept \ chain=forward dst-address=192.168.2.0/24 src-address=192.168.144.146.0/24
/ip firewall nat
add chain=srcnat action=accept place-before=0 \
src-address=192.168.2.0/24 dst-address=192.168.144.146.0/24