edit: sorry, but somehow the “code” areas messedup
Hi, please, can anyone help me. I’ve tried to setup VPN site to site, but i’m stucked at point, when site B, can ping devices in site A, but site A can’t ping devices in site B. Both routers can ping each other.
Site A (have two VPNs set)
public IP, WireGuard “server” named “Zavratec”, IP 192.168.60.1, local IP 192.168.10.0/24
Site B:
nonpublic IP, WireGuard peer, IP 192.168.60.2, local IP 192.168.30.0/24
Setup of Site A router
# 2025-06-04 06:22:43 by RouterOS 7.16.1
# software id = CPBV-3LI7
#
# model = RB750Gr3
# serial number = xxxxxxx
/caps-man channel
add band=2ghz-b/g/n control-channel-width=20mhz extension-channel=disabled \
frequency=2412 name=channel1
add band=2ghz-b/g/n control-channel-width=20mhz extension-channel=disabled \
frequency=2437 name=channel6
add band=2ghz-b/g/n control-channel-width=20mhz extension-channel=disabled \
frequency=2462 name=channel11
add band=5ghz-a/n/ac control-channel-width=20mhz extension-channel=disabled \
frequency=5180 name=channel36
add band=5ghz-a/n/ac control-channel-width=20mhz extension-channel=disabled \
frequency=5200 name=channel40
/caps-man datapath
add client-to-client-forwarding=yes local-forwarding=yes name=local
/interface bridge
add name=bridge1 port-cost-mode=short
/interface ethernet
set [ find default-name=ether1 ] mac-address=C4:xx:xx:xx:02:BB name=1_WAN
set [ find default-name=ether2 ] name=2_LAN
set [ find default-name=ether3 ] name=3_LAN
set [ find default-name=ether4 ] name=4_LAN
set [ find default-name=ether5 ] name=5_LAN
/interface wireguard
add listen-port=13231 mtu=1420 name="Personal VPN"
add listen-port=13232 mtu=1420 name=Zavratec
/caps-man security
add authentication-types=wpa2-psk encryption=aes-ccm name=heslo
/caps-man configuration
add country="czech republic" datapath=local distance=indoors mode=ap name=\
Janecek-2G rx-chains=0,1,2 security=heslo ssid=Janecek-2G tx-chains=0,1,2
add channel=channel36 country="czech republic" datapath=local distance=\
indoors mode=ap name=Janecek-5G rx-chains=0,1,2 security=heslo ssid=\
Janecek-5G tx-chains=0,1,2
/caps-man interface
add configuration=Janecek-2G disabled=no l2mtu=1600 mac-address=\
C4:AD:34:7C:C5:1C master-interface=none name=Obyvak_2G radio-mac=\
C4:AD:34:7C:C5:1C radio-name=C4AD347CC51C
add configuration=Janecek-5G disabled=no l2mtu=1600 mac-address=\
C4:AD:34:7C:C5:1D master-interface=none name=Obyvak_5G radio-mac=\
C4:AD:34:7C:C5:1D radio-name=C4AD347CC51D
add configuration=Janecek-2G disabled=no l2mtu=1600 mac-address=\
C4:AD:34:7C:C5:10 master-interface=none name=Satna_2G radio-mac=\
C4:AD:34:7C:C5:10 radio-name=C4AD347CC510
add configuration=Janecek-5G disabled=no l2mtu=1600 mac-address=\
C4:AD:34:7C:C5:11 master-interface=none name=Satna_5G radio-mac=\
C4:AD:34:7C:C5:11 radio-name=C4AD347CC511
/interface list
add name=WAN
add name=LAN
/interface lte apn
set [ find default=yes ] ip-type=ipv4 use-network-apn=no
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.10.20-192.168.10.254
add name=vpn ranges=192.168.15.2-192.168.15.254
add name=vpn_zavratec ranges=192.168.60.1-192.168.60.254
/ip dhcp-server
add address-pool=dhcp interface=bridge1 lease-time=10m name=dhcp1
/ip smb users
set [ find default=yes ] disabled=yes
/port
set 0 name=serial0
/ppp profile
set *FFFFFFFE dns-server=192.168.1.1 local-address=192.168.15.1 \
remote-address=vpn
/caps-man manager
set ca-certificate=auto certificate=auto enabled=yes
/interface bridge port
add bridge=bridge1 ingress-filtering=no interface=2_LAN internal-path-cost=10 \
path-cost=10
add bridge=bridge1 ingress-filtering=no interface=3_LAN internal-path-cost=10 \
path-cost=10
add bridge=bridge1 ingress-filtering=no interface=4_LAN internal-path-cost=10 \
path-cost=10
add bridge=bridge1 ingress-filtering=no interface=5_LAN internal-path-cost=10 \
path-cost=10
/ip firewall connection tracking
set udp-timeout=10s
/ip neighbor discovery-settings
set discover-interface-list=!dynamic
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface detect-internet
set detect-interface-list=WAN internet-interface-list=WAN lan-interface-list=\
LAN wan-interface-list=WAN
/interface l2tp-server server
set enabled=yes use-ipsec=yes
/interface list member
add interface=1_WAN list=WAN
add interface=bridge1 list=LAN
add interface="Personal VPN" list=LAN
/interface ovpn-server server
set auth=sha1,md5
/interface pptp-server server
# PPTP connections are considered unsafe, it is suggested to use a more modern VPN protocol instead
set enabled=yes
/interface sstp-server server
set default-profile=default-encryption enabled=yes
/interface wireguard peers
add allowed-address=192.168.15.2/32 comment="Peja Telefon" interface=\
"Personal VPN" name=peer1 preshared-key=\
"xxxxx" public-key=\
"xxxxxx= "
add allowed-address=192.168.15.3/32 comment="Peja NTB" interface=\
"Personal VPN" name=peer2 preshared-key=\
"xxxxx" public-key=\
"xxxxx"
add allowed-address=192.168.15.4/32 comment="Peja Tablet" interface=\
"Personal VPN" name=peer3 preshared-key=\
"xxxxxxx" public-key=\
"xxxxxxx"
add allowed-address=192.168.60.0/24,192.168.30.0/24 comment="Zavratec MKTK" \
endpoint-address=xxxxxx.sn.mynetname.net endpoint-port=13232 \
interface=Zavratec name=peerZ3 preshared-key=\
"xxxxxx" public-key=\
"xxxxxxx"
/ip address
add address=192.168.10.1/24 interface=bridge1 network=192.168.10.0
add address=192.168.15.1/24 interface="Personal VPN" network=192.168.15.0
add address=192.168.60.1/30 comment="VPN zavratec" interface=Zavratec \
network=192.168.60.0
/ip cloud
set ddns-enabled=yes update-time=no
/ip dhcp-client
add interface=1_WAN
/ip dhcp-server lease
add address=192.168.10.243 mac-address=10:BF:48:8B:A5:AF server=dhcp1
/ip dhcp-server network
add address=192.168.10.0/24 caps-manager=192.168.10.1 gateway=192.168.10.1
/ip firewall address-list
add address=192.168.10.0/24 comment="Domaci LAN" list=SecureIP
add address=192.168.10.254 comment=AP_Obyvak list=InfrastructureIP
add address=192.168.10.1 comment=RB_Main list=InfrastructureIP
add address=192.168.10.217 comment=AP_Satna list=InfrastructureIP
add address=192.168.15.0/24 comment="Domaci VPN" list=SecureIP
add address=192.168.60.0/24 comment="VPN Zavratec" list=SecureIP
add address=192.168.30.0/24 comment="VPN Zavratec-vnitrni sit" list=SecureIP
/ip firewall filter
add action=accept chain=input comment="Povolit WireGuard" dst-port=13231 \
protocol=udp
add action=accept chain=input comment="Povolit WireGuard-Zavrazec" dst-port=\
13232 protocol=udp
add action=accept chain=input comment="Povol WireGuard traffic" src-address=\
192.168.15.0/24
add action=accept chain=input comment="Povol WireGuard traffic-Zavratec" \
src-address=192.168.60.0/24
add action=accept chain=input comment="====== OCHRANA ROUTERU ======" \
disabled=yes
add action=accept chain=input comment=\
"Povol established, related, untracked spojeni" connection-state=\
established,related,untracked
add action=drop chain=input comment="Zahod invalid spojeni" connection-state=\
invalid
add action=accept chain=input comment="Povol veskere ICMP pakety" protocol=\
icmp
add action=accept chain=input comment="Povol vse z AdresList \"SecureIP\"" \
src-address-list=SecureIP
add action=drop chain=input comment="Zahod vse ostatni"
add action=accept chain=forward comment=\
"====== OCHRANA KONCOVYCH STANIC =======" disabled=yes
add action=fasttrack-connection chain=forward comment="Fast Track" \
connection-state=related hw-offload=yes
add action=accept chain=forward comment=\
"Povol established, related, untracked spojeni" connection-state=\
established,related,untracked
add action=drop chain=forward comment="Zahod invalid spojeni" \
connection-state=invalid
add action=accept chain=forward comment=\
"Povol vse z IL \"LAN\" do IL \"WAN\"" in-interface-list=LAN \
out-interface-list=WAN
add action=accept chain=forward comment="Povol vse z AL \"SecureIP\"" \
src-address-list=SecureIP
add action=drop chain=forward comment="Zahod vse z AL \"InfrastructureIP\"" \
dst-address-list=InfrastructureIP
add action=accept chain=forward comment="Povol presmerovane porty" \
connection-nat-state=dstnat
add action=drop chain=forward comment="Zahod vse ostatni"
/ip firewall nat
add action=masquerade chain=srcnat comment="masq. vpn traffic" src-address=\
192.168.15.0/24
add action=masquerade chain=srcnat comment="masq. vpn traffic Zavr" \
src-address=192.168.60.0/24
add action=masquerade chain=srcnat out-interface-list=WAN
/ip ipsec profile
set [ find default=yes ] dpd-interval=2m dpd-maximum-failures=5
/ip kid-control
add fri=0s-1d mon=0s-1d name=system-dummy sat=0s-1d sun=0s-1d thu=0s-1d tue=\
0s-1d tur-fri=0s-1d tur-mon=0s-1d tur-sat=0s-1d tur-sun=0s-1d tur-thu=\
0s-1d tur-tue=0s-1d tur-wed=0s-1d wed=0s-1d
/ip route
add disabled=yes dst-address=0.0.0.0/0 gateway=10.218.105.129
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api-ssl disabled=yes
/ip smb shares
set [ find default=yes ] directory=/flash/pub
/ip upnp
set enabled=yes
/ppp secret
add name=vpn
/routing bfd configuration
add disabled=no
/system clock
set time-zone-autodetect=no time-zone-name=Europe/Prague
/system identity
set name=RB_main
/system note
set show-at-login=no
/system ntp client
set enabled=yes
/system ntp client servers
add address=217.31.202.100
/system routerboard settings
set auto-upgrade=yes
/system scheduler
add interval=1w name=package_upgrade on-event="system package update install" \
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=2020-03-07 start-time=07:25:00
add interval=1d name=RB_upgrade on-event=":global Var1\r\
\n:global Var2\r\
\n:set Var1 \"\$[/system package get system version]\"\r\
\n:set Var2 \"\$[/system routerboard get current-firmware]\"\r\
\n:if (\$Var1>\$Var2) do={/system routerboard upgrade;\r\
\n/system reboot;\r\
\n}" policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=2020-03-07 start-time=07:38:00
/system script
add dont-require-permissions=no name=vytvorit_zalohy owner=peja policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=":\
global filename;\r\
\n:global identity [/system identity get name];\r\
\n:set filename (\$identity);\r\
\n/system backup save name=\$filename;\r\
\n:delay 3s;\r\
\n:global rsc \$filename;\r\
\n/export file=\$rsc;"
/tool graphing interface
add
/tool graphing queue
add
/tool graphing resource
add
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
/user group
add name=apigroup policy="read,write,api,!local,!telnet,!ssh,!ftp,!reboot,!pol\
icy,!test,!winbox,!password,!web,!sniff,!sensitive,!romon,!rest-api"
Setup of Site B router
# 2025-03-27 12:41:03 by RouterOS 7.18.2
# software id = Q9F4-0N6B
#
# model = RB951Ui-2HnD
# serial number = xxxxxxx
/interface bridge
add name=bridge1
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n country="czech republic" \
disabled=no frequency=2462 mode=ap-bridge ssid=fafa86 wireless-protocol=\
802.11
/interface wireguard
add listen-port=13232 mtu=1420 name=wireguard1
/interface list
add name=WAN
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=\
dynamic-keys supplicant-identity=MikroTik
/iot lora servers
add address=eu.mikrotik.thethings.industries name=TTN-EU protocol=UDP
add address=us.mikrotik.thethings.industries name=TTN-US protocol=UDP
add address=eu1.cloud.thethings.industries name="TTS Cloud (eu1)" protocol=\
UDP
add address=nam1.cloud.thethings.industries name="TTS Cloud (nam1)" protocol=\
UDP
add address=au1.cloud.thethings.industries name="TTS Cloud (au1)" protocol=\
UDP
add address=eu1.cloud.thethings.network name="TTN V3 (eu1)" protocol=UDP
add address=nam1.cloud.thethings.network name="TTN V3 (nam1)" protocol=UDP
add address=au1.cloud.thethings.network name="TTN V3 (au1)" protocol=UDP
/ip pool
add name=dhcp ranges=192.168.30.2-192.168.30.254
add name=vpn ranges=192.168.60.2-192.168.60.255
/ip dhcp-server
add address-pool=dhcp interface=bridge1 name=dhcp1
/ppp profile
set *FFFFFFFE local-address=192.168.89.1 remote-address=vpn
/interface bridge port
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether5
add bridge=bridge1 interface=wlan1
/ip firewall connection tracking
set udp-timeout=10s
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface detect-internet
set detect-interface-list=all internet-interface-list=WAN lan-interface-list=\
LAN wan-interface-list=WAN
/interface l2tp-server server
set enabled=yes use-ipsec=yes
/interface list member
add interface=bridge1 list=LAN
add interface=ether1 list=WAN
/interface ovpn-server server
add mac-address=xx:xx:xx:8B:AC:4D name=ovpn-server1
/interface wireguard peers
add allowed-address=192.168.60.0/24,192.168.10.0/24,192.168.30.0/24 \
endpoint-address=212.xxx.xxx.xxx endpoint-port=13232 interface=wireguard1 \
name=Kladno persistent-keepalive=5m preshared-key=\
"xxxxxx" public-key=\
"xxxxxx"
/iot lora traffic options
set crc-errors=no
set crc-errors=no
/ip address
add address=192.168.30.1/24 interface=bridge1 network=192.168.30.0
add address=192.168.60.2/30 interface=wireguard1 network=192.168.60.0
/ip cloud
set ddns-enabled=yes
/ip dhcp-client
add interface=ether1
/ip dhcp-server network
add address=192.168.30.0/24 gateway=192.168.30.1
/ip firewall filter
add action=accept chain=input protocol=icmp
add action=accept chain=input comment="povol VPN" dst-port=13232 protocol=udp
add action=accept chain=input comment="povol VPN traffic" src-address=\
192.168.60.0/24
add action=accept chain=input connection-state=established
add action=accept chain=input connection-state=related
add action=accept chain=input comment="allow IPsec NAT" dst-port=4500 \
protocol=udp
add action=accept chain=input comment="allow IKE" dst-port=500 protocol=udp
add action=accept chain=input comment="allow l2tp" dst-port=1701 protocol=udp
add action=drop chain=input in-interface-list=!LAN
/ip firewall nat
add action=masquerade chain=srcnat comment="masq. vpn traffic" disabled=yes \
out-interface=ether1
add action=masquerade chain=srcnat comment="masq. vpn traffic" src-address=\
192.168.60.0/24
add action=masquerade chain=srcnat out-interface-list=WAN
/ip hotspot profile
set [ find default=yes ] html-directory=hotspot
/ip ipsec profile
set [ find default=yes ] dpd-interval=2m dpd-maximum-failures=5
/ip route
add comment=Zavratec disabled=no distance=1 dst-address=192.168.10.0/24 \
gateway=192.168.60.1 routing-table=main scope=30 suppress-hw-offload=no \
target-scope=10
/ip service
set ftp disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/ip smb shares
set [ find default=yes ] directory=pub
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=bridge1 type=internal
add interface=ether1 type=external
/ppp secret
add name=peja
add name=vpn
/system clock
set time-zone-name=Europe/Prague
/system gps
set set-system-time=no
/system leds settings
set all-leds-off=immediate
/system note
set show-at-login=no
/system ntp client
set enabled=yes
/system ntp client servers
add address=217.31.202.100 disabled=yes
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
Ping test from Site A:
[peja@RB_main] > ping 192.168.60.2
SEQ HOST SIZE TTL TIME STATUS
0 192.168.60.2 56 64 10ms723us
1 192.168.60.2 56 64 10ms870us
2 192.168.60.2 56 64 10ms846us
3 192.168.60.2 56 64 10ms494us
4 192.168.60.2 56 64 10ms572us
sent=5 received=5 packet-loss=0% min-rtt=10ms494us avg-rtt=10ms701us
max-rtt=10ms870us
[peja@RB_main] > ping 192.168.30.253
SEQ HOST SIZE TTL TIME STATUS
0 192.168.30.253 timeout
1 192.168.30.253 timeout
2 192.168.30.253 timeout
3 192.168.30.253 timeout
sent=4 received=0 packet-loss=100%
[peja@RB_main] >
Ping test from Site B:
[peja@RB_main] > ping 192.168.60.2
SEQ HOST SIZE TTL TIME STATUS
0 192.168.60.2 56 64 10ms723us
1 192.168.60.2 56 64 10ms870us
2 192.168.60.2 56 64 10ms846us
3 192.168.60.2 56 64 10ms494us
4 192.168.60.2 56 64 10ms572us
sent=5 received=5 packet-loss=0% min-rtt=10ms494us avg-rtt=10ms701us
max-rtt=10ms870us
[peja@RB_main] > [peja@MikroTik] > ping 192.168.60.1
SEQ HOST SIZE TTL TIME STATUS
0 192.168.60.1 56 64 10ms716us
1 192.168.60.1 56 64 11ms76us
2 192.168.60.1 56 64 22ms787us
sent=3 received=3 packet-loss=0% min-rtt=10ms716us avg-rtt=14ms859us
max-rtt=22ms787us
[peja@MikroTik] > ping 192.168.10.63
SEQ HOST SIZE TTL TIME STATUS
0 192.168.10.63 56 63 14ms586us
1 192.168.10.63 56 63 20ms618us
2 192.168.10.63 56 63 24ms577us
sent=3 received=3 packet-loss=0% min-rtt=14ms586us avg-rtt=19ms927us
max-rtt=24ms577us
[peja@MikroTik] >
And the question under the line… How to setup winbox acces from WAN (with aloowed IP list, of course).
Thak you very much for your help