Wireguard VPN setup

It works !!! :smiley: :smiley: :smiley: :smiley: :smiley:

So all this time was problem with Windows ? As i was getting same error in Windows and same log entry in router.

I tried before I changed firewall rules, as I just saw your post but it works. I deleted all rules and updated my as you instructed. Here is the latest config:

# jan/06/2022 17:28:06 by RouterOS 7.1.1
# software id = KL0T-VH4S
#
# model = RBD53iG-5HacD2HnD
# serial number = xxxxxxxxxx
/interface bridge
add admin-mac=xxxxxxxxxx auto-mac=no comment=defconf name=bridge
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
    disabled=no distance=indoors frequency=auto installation=indoor mode=\
    ap-bridge ssid=MikroTik-7E5179 wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=\
    20/40/80mhz-XXXX disabled=no distance=indoors frequency=auto \
    installation=indoor mode=ap-bridge ssid=MikroTik-7E517A \
    wireless-protocol=802.11
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface lte apn
set [ find default=yes ] ip-type=ipv4
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.88.10-192.168.88.254
add name=vpn ranges=192.168.89.2-192.168.89.255
/ip dhcp-server
add address-pool=dhcp interface=bridge name=defconf
/ppp profile
add local-address=192.168.89.1 name=vpn remote-address=vpn
set *FFFFFFFE local-address=192.168.89.1 remote-address=vpn
/interface bridge port
add bridge=bridge comment=defconf ingress-filtering=no interface=ether2
add bridge=bridge comment=defconf ingress-filtering=no interface=ether3
add bridge=bridge comment=defconf ingress-filtering=no interface=ether4
add bridge=bridge comment=defconf ingress-filtering=no interface=ether5
add bridge=bridge comment=defconf ingress-filtering=no interface=wlan1
add bridge=bridge comment=defconf ingress-filtering=no interface=wlan2
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface detect-internet
set detect-interface-list=WAN internet-interface-list=WAN
/interface l2tp-server server
set authentication=mschap2 default-profile=vpn enabled=yes use-ipsec=required
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/interface sstp-server server
set default-profile=default-encryption
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
    192.168.88.0
/ip cloud
set ddns-enabled=yes
/ip dhcp-client
add comment=defconf interface=ether1
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
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 \
    ipsec-policy=in,ipsec protocol=udp
add action=accept chain=input comment="allow pptp" dst-port=1723 protocol=tcp
add action=accept chain=input comment="allow sstp" dst-port=443 protocol=tcp
add action=accept chain=input comment="allow ipsec-esp" protocol=ipsec-esp
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=input comment=\
    "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
    in-interface-list=!LAN
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 hw-offload=yes
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
add action=drop chain=forward comment=\
    "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
    ipsec-policy=out,none out-interface-list=WAN
add action=masquerade chain=srcnat comment="masq. vpn traffic" src-address=\
    192.168.89.0/24
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=bridge type=internal
add interface=ether1 type=external
/ppp secret
add name=vpn profile=vpn service=l2tp
add name=l2tp profile=vpn service=l2tp
/system clock
set time-zone-name=Europe/Zagreb
/system leds
set 0 interface=wlan1 leds=led1,led2,led3,led4,led5 type=\
    wireless-signal-strength
set 1 leds=poe-led type=poe-out
/system routerboard settings
set cpu-frequency=auto
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN

Only problem is, when I ping 192.168.88.1 i get response, second time i try to ping half of the packets are dropped. And PC that is on 192.168.88.249 can’t be pinged.
Also, I can ping 192.168.1.0 addresses, i presume i have to make firewall rule so i can’t ping outside 192.168.88.0

YEAH!! Success.
Now go to the hospital to suture up the head wounds from banging your head against the LT2P VPN wall.

Non-pingable PC can be because of PC’s own firewall, it’s another weird default config in Windows. I don’t see any explanation for dropped pings to 192.168.88.1 in your config.

Well, maybe it’s the problem that I’m using mobile phone as hotspot for the client laptop. And I was getting ping value from 49 ms up to 300 ms.

This was only the test setup, now i need to replicate this on monday on my office router. I’m also using VPN address provided by mikrotik, I think there is no need for dedicated DDNS.

Can I disable PPTP and SSTP firewall rule because I’m not using that so there is no need to be active ?

@anav
I think this was a good experience, but as I work with electronics and programming microcontrolers I learned how to keep my head cool so no need for a trip to the ER hehe
I definitely learned a lot today, and thank you all for your help and patience. I think that topic should be called L2TP VPN setup.

No worries, always good to make progress and yes, its always a good idea to disable services not being used.

Tested on my office network and it’s working like a charm. I only modified username, password and IPsec secret (i created radnom 40 char key for that) so that I’m not using default username “vpn” and i disabled PPTP and SSTP servers and disabled their firewall rule.

Now in the city where mobile network signal is better there is no dropped pings.

Only one thing that i noticed, i can’t connect using Mikrotik’s VPN address, so I tried to ping it from client PC i get Mikrotik’s WAN address (192.168.10.8 at my case) but when i tried to ping my DDNS address i get my normal public IP and i can connect. At home when i ping test router VPN address i get my Public IP.

At work we have hybrid DSL/LTE router and I have assigned static IP for Mikrotik and i put that IP in DMZ so router from ISP forward all ports to Mikrotik (no devices are connected to ISP router except mikrotik), i did that at home while testing and it was working.

I’m not sure if I understand you, but of course you need to be using public address (or DDNS hostname), private ones are not reachable from internet. If I misunderstood what you’re trying to say, try to explain it in more details.

I thought that VPN address at Quickset page can be used instead of the dedicated DDNS service.

At my home test setup i use that address instead of DDNS and it was working.

That is Mikrotik’s own DDNS service.
Check IP/Cloud, you will see it there again.

Yes, your .sn.mynetname.net should work too, it should resolve to same public address as other DDNS you use.

I will check it one more tomorrow, but at home, mikrotik address is resolved as my public IP.

But at work mikrotik address is resolved as an IP address that router gets from ISP router (192.168.10.:sunglasses:

Such option exists (/ip cloud advanced set use-local-address=yes). You don’t want it, because 192.168.10.8 is not reachable from internet. But if you’d set it by mistake, hostname should be resolved to this address everywhere.

That was an error, i just checked and that box, Use local IP was checked, i unchecked it and rebooted the router. Now it’s working.

Now I’m trying to make site to site link, i have wAP LTE kit that i will use for remote site and in R2 (wAP LTE) in interface menu i selected L2TP client, then i entered user, password, IPsec key and address to connect.

Maybe in the future i add another router for another remote site.

Routers connect immediately but i can’t ping anything. I added firewall rules to the R2. Here is the configuration of office router R1 and remote site router R2

R2 (wAP LTE KIT)

# jan/12/2022 07:18:27 by RouterOS 7.1.1
# software id = J61H-4XD4
#
# model = RBwAPR-2nD
# serial number = XXXXXXXXXXXX
/interface bridge
add admin-mac=XX:XX:XX:XX:XX:XX auto-mac=no comment=defconf name=bridge
/interface lte
set [ find ] allow-roaming=no band="" name=lte1
/interface l2tp-client
add connect-to=xxxxxxxxxxxxxxxxxxxxxxx disabled=no name=l2tp-out1 use-ipsec=yes \
    user="**************"
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
    distance=indoors frequency=auto installation=outdoor mode=ap-bridge ssid=\
    MikroTik-7FCF0A wireless-protocol=802.11
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface lte apn
set [ find default=yes ] apn=internet.isp.provider ip-type=ipv4 name=ISPName
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.25.244-192.168.25.254
add name=vpn ranges=192.168.89.2-192.168.89.255
/ip dhcp-server
add address-pool=dhcp interface=bridge name=defconf
/ppp profile
set *FFFFFFFE local-address=192.168.89.1 remote-address=vpn
/interface bridge port
add bridge=bridge comment=defconf ingress-filtering=no interface=ether1
add bridge=bridge comment=defconf ingress-filtering=no interface=wlan1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface l2tp-server server
set use-ipsec=yes
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=lte1 list=WAN
/interface sstp-server server
set default-profile=default-encryption
/ip address
add address=192.168.25.1/24 comment=defconf interface=bridge network=\
    192.168.25.0
/ip cloud
set ddns-enabled=yes
/ip dhcp-server network
add address=192.168.25.0/24 gateway=192.168.25.1 netmask=24
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.25.1 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
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 \
    ipsec-policy=in,ipsec protocol=udp
add action=accept chain=input comment="allow ipsec-esp" protocol=ipsec-esp
add action=accept chain=input comment="allow pptp" disabled=yes dst-port=1723 \
    protocol=tcp
add action=accept chain=input comment="allow sstp" disabled=yes dst-port=443 \
    protocol=tcp
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=input comment=\
    "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
    in-interface-list=!LAN
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 hw-offload=yes
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
add action=drop chain=forward comment=\
    "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
    ipsec-policy=out,none out-interface-list=WAN
add action=masquerade chain=srcnat comment="masq. vpn traffic" src-address=\
    192.168.89.0/24
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=bridge type=internal
add interface=lte1 type=external
/ppp secret
add name=vpn
/system clock
set time-zone-name=Europe/Zagreb
/system leds
# using RSRP, modem-signal-threshold ignored
add interface=lte1 leds=led1 type=modem-signal
# using RSRP, modem-signal-threshold ignored
add interface=lte1 leds=led2 modem-signal-threshold=-71 type=modem-signal
# using RSRP, modem-signal-threshold ignored
add interface=lte1 leds=led3 modem-signal-threshold=-51 type=modem-signal
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN



R1 (Office router)
[code]# jan/12/2022 07:24:41 by RouterOS 7.1.1
# software id = CD7M-66CD
#
# model = RB952Ui-5ac2nD
# serial number = xxxxxxxxxxxxxxxxxxxxxx
/interface bridge
add admin-mac=xxxxxxxxxxxxxxxxxxxxxxxx auto-mac=no comment=defconf name=bridge
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-g/n country=croatia disabled=no \
    distance=indoors frequency=2472 installation=indoor mode=ap-bridge ssid=\
    "Fidens 2.4G" wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=\
    20/40/80mhz-XXXX country=croatia disabled=no distance=indoors frequency=\
    auto installation=indoor mode=ap-bridge ssid="Fidens 5G" \
    wireless-protocol=802.11
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface lte apn
set [ find default=yes ] ip-type=ipv4
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=\
    dynamic-keys supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.1.1-192.168.1.254
add name=vpn ranges=192.168.89.2-192.168.89.255
/ip dhcp-server
add address-pool=dhcp interface=bridge name=defconf
/ppp profile
add local-address=192.168.89.1 name=VPN_Ured remote-address=vpn
set *FFFFFFFE local-address=192.168.89.1 remote-address=vpn
/interface bridge port
add bridge=bridge comment=defconf ingress-filtering=no interface=ether2
add bridge=bridge comment=defconf ingress-filtering=no interface=ether3
add comment=defconf ingress-filtering=no interface=ether4
add bridge=bridge comment=defconf ingress-filtering=no interface=ether5
add bridge=bridge comment=defconf ingress-filtering=no interface=wlan1
add bridge=bridge comment=defconf ingress-filtering=no interface=wlan2
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface detect-internet
set detect-interface-list=all
/interface l2tp-server server
set authentication=mschap2 default-profile=VPN_Ured enabled=yes use-ipsec=\
    required
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/interface sstp-server server
set default-profile=default-encryption
/ip address
add address=192.168.1.1/24 comment=defconf interface=bridge network=\
    192.168.1.0
/ip arp
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
/ip cloud
set ddns-enabled=yes ddns-update-interval=15m
/ip dhcp-client
add comment=defconf interface=ether1
/ip dhcp-server lease
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
/ip dhcp-server network
add address=192.168.1.0/24 comment=defconf gateway=192.168.1.1 netmask=24
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.1.1 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
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 \
    ipsec-policy=in,ipsec protocol=udp
add action=accept chain=input comment="allow pptp" disabled=yes dst-port=1723 \
    protocol=tcp
add action=accept chain=input comment="allow sstp" disabled=yes dst-port=443 \
    protocol=tcp
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=accept chain=input comment="allow ipsec-esp" protocol=ipsec-esp
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=input comment=\
    "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
    in-interface-list=!LAN
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related hw-offload=yes
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
add action=drop chain=forward comment=\
    "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
    ipsec-policy=out,none out-interface-list=WAN
add action=dst-nat chain=dstnat comment="Port 21 za FTP server" dst-address=\
    192.168.10.8 dst-port=21 in-interface=ether1 protocol=tcp to-addresses=\
    192.168.1.39 to-ports=21
add action=masquerade chain=srcnat comment="masq. vpn traffic" src-address=\
    192.168.89.0/24
add action=dst-nat chain=dstnat comment="Divar IP kockica" disabled=yes \
    dst-address=192.168.10.8 dst-port=442 in-interface=ether1 protocol=tcp \
    to-addresses=192.168.1.139 to-ports=442
add action=dst-nat chain=dstnat comment="VDC BL2/0 - VPN" disabled=yes \
    dst-address=192.168.10.8 dst-port=500 in-interface=ether1 protocol=udp \
    to-addresses=192.168.1.6 to-ports=500
add action=dst-nat chain=dstnat disabled=yes dst-address=192.168.10.8 \
    dst-port=4500 in-interface=ether1 protocol=udp to-addresses=192.168.1.6 \
    to-ports=4500
/ip firewall service-port
set udplite ports=500
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=bridge type=internal
add interface=ether1 type=external
/ppp secret
add name="Kre\9Ao@VPN" profile=VPN_Ured service=l2tp
/system clock
set time-zone-name=Europe/Zagreb
/system ntp client
set enabled=yes
/system ntp client servers
add address=161.53.128.17
add address=45.87.77.15
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
/tool netwatch
add comment="Divar IP3000 \"Kockica\"" host=192.168.1.139
add comment="NAS server" host=192.168.1.39
add comment="Biostar 2 server" host=192.168.1.20
add comment="Dinioin IP4000" down-script="Ispad kamere" host=192.168.20.108 \
    up-script="Kamera ukljucena"

[/code]

try to disable FastTrack in the forward rule then restart. try if it works, Also if it site to site. then just use WG as you are already running 7.1.1 its super EZ for a site to site
check this link.
https://help.mikrotik.com/docs/display/ROS/WireGuard

So I followed instructions from the website (but i changed IP so it match my used IP) and i can’t establish connection, but i noticed that on my LTE router, Internet IP address is in 10.X.X.X range, and Public IP is in 81.X.X.X range so i think that is the problem, and in the cloud menu there is message “Router is behind a NAT. Remote connection might not work.”

Also, in this section

Office1

/ip/firewall/filter
add action=accept chain=input dst-port=13231 protocol=udp src-address=192.168.80.1
Office2

/ip/firewall/filter
add action=accept chain=input dst-port=13231 protocol=udp src-address=192.168.90.1

Instead 192.168.90.1 I put DDNS but it won’t accept it, i mean i know it’s not a valid IP range but i don’t have static IP addresses

When you start from a cgnat device (is the case for a lot of lte devices) you need to point towards a device with either fixed ip, either something with ddns ( but not cgnat).

I can always ask an ISP provider to remove me from CGNAT if possible. That should solve the problem.

Here is R1 config (Office router)

# jan/12/2022 12:50:10 by RouterOS 7.1.1
# software id = CD7M-66CD
#
# model = RB952Ui-5ac2nD
# serial number = ******************
/interface bridge
add admin-mac=************** auto-mac=no comment=defconf name=bridge
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-g/n country=croatia disabled=no \
    distance=indoors frequency=2472 installation=indoor mode=ap-bridge ssid=\
    "Fidens 2.4G" wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=\
    20/40/80mhz-XXXX country=croatia disabled=no distance=indoors frequency=\
    auto installation=indoor mode=ap-bridge ssid="Fidens 5G" \
    wireless-protocol=802.11
/interface wireguard
add listen-port=13231 mtu=1420 name=wireguard1
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface lte apn
set [ find default=yes ] ip-type=ipv4
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=\
    dynamic-keys supplicant-identity=MikroTik
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha512
/ip pool
add name=dhcp ranges=192.168.1.1-192.168.1.254
add name=vpn ranges=192.168.89.2-192.168.89.255
/ip dhcp-server
add address-pool=dhcp interface=bridge name=defconf
/ppp profile
add local-address=192.168.89.1 name=VPN_Ured remote-address=vpn
set *FFFFFFFE local-address=192.168.89.1 remote-address=vpn
/interface bridge port
add bridge=bridge comment=defconf ingress-filtering=no interface=ether2
add bridge=bridge comment=defconf ingress-filtering=no interface=ether3
add comment=defconf ingress-filtering=no interface=ether4
add bridge=bridge comment=defconf ingress-filtering=no interface=ether5
add bridge=bridge comment=defconf ingress-filtering=no interface=wlan1
add bridge=bridge comment=defconf ingress-filtering=no interface=wlan2
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface detect-internet
set detect-interface-list=all
/interface l2tp-server server
set authentication=mschap2 default-profile=VPN_Ured enabled=yes use-ipsec=\
    required
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/interface sstp-server server
set default-profile=default-encryption
/interface wireguard peers
add allowed-address=192.168.25.0/24 endpoint-address=\
    +++++++++++++++.sn.mynetname.net endpoint-port=13231 interface=wireguard1 \
    public-key="++++++++++++++++++++++++++++++++++++++++++++"
/ip address
add address=192.168.1.1/24 comment=defconf interface=bridge network=\
    192.168.1.0
add address=10.255.255.1/30 interface=wireguard1 network=10.255.255.0
/ip arp

/ip cloud
set ddns-enabled=yes ddns-update-interval=15m
/ip dhcp-client

/ip dhcp-server network
add address=192.168.1.0/24 comment=defconf gateway=192.168.1.1 netmask=24
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.1.1 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
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 \
    ipsec-policy=in,ipsec protocol=udp
add action=accept chain=input comment="allow pptp" disabled=yes dst-port=1723 \
    protocol=tcp
add action=accept chain=input comment="allow sstp" disabled=yes dst-port=443 \
    protocol=tcp
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=accept chain=input comment="allow ipsec-esp" protocol=ipsec-esp
add action=accept chain=forward dst-address=192.168.1.0/24 src-address=\
    192.168.25.0/24
add action=accept chain=forward dst-address=192.168.25.0/24 src-address=\
    192.168.1.0/24
add action=accept chain=input dst-port=13231 protocol=udp src-address=\
    10.3.191.181
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=input comment=\
    "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
    in-interface-list=!LAN
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related hw-offload=yes
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
add action=drop chain=forward comment=\
    "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
    ipsec-policy=out,none out-interface-list=WAN
add action=dst-nat chain=dstnat comment="Port 21 za FTP server" dst-address=\
    192.168.10.8 dst-port=21 in-interface=ether1 protocol=tcp to-addresses=\
    192.168.1.39 to-ports=21
add action=masquerade chain=srcnat comment="masq. vpn traffic" src-address=\
    192.168.89.0/24
add action=dst-nat chain=dstnat comment="Divar IP kockica" disabled=yes \
    dst-address=192.168.10.8 dst-port=442 in-interface=ether1 protocol=tcp \
    to-addresses=192.168.1.139 to-ports=442
add action=dst-nat chain=dstnat comment="VDC BL2/0 - VPN" disabled=yes \
    dst-address=192.168.10.8 dst-port=500 in-interface=ether1 protocol=udp \
    to-addresses=192.168.1.6 to-ports=500
add action=dst-nat chain=dstnat disabled=yes dst-address=192.168.10.8 \
    dst-port=4500 in-interface=ether1 protocol=udp to-addresses=192.168.1.6 \
    to-ports=4500
/ip firewall service-port
set udplite ports=500
/ip route
add dst-address=192.168.25.0/24 gateway=wireguard1
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=bridge type=internal
add interface=ether1 type=external
/ppp secret
add name="+++++++++" profile=VPN_Ured service=l2tp
/system clock
set time-zone-name=Europe/Zagreb
/system ntp client
set enabled=yes
/system ntp client servers
add address=161.53.128.17
add address=45.87.77.15
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
/tool netwatch

And R2 (LTE)

# jan/12/2022 12:56:13 by RouterOS 7.1.1
# software id = J61H-4XD4
#
# model = RBwAPR-2nD
# serial number = ++++++++++++
/interface bridge
add admin-mac=+++++++++++++ auto-mac=no comment=defconf name=bridge
/interface lte
set [ find ] allow-roaming=no band="" name=lte1
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
    distance=indoors frequency=auto installation=outdoor mode=ap-bridge ssid=\
    MikroTik-7FCF0A wireless-protocol=802.11
/interface wireguard
add listen-port=13231 mtu=1420 name=wireguard1
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface lte apn
set [ find default=yes ] apn=internet.+++++++ ip-type=ipv4 name=++++++++++
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.25.244-192.168.25.254
add name=vpn ranges=192.168.89.2-192.168.89.255
/ip dhcp-server
add address-pool=dhcp interface=bridge name=defconf
/ppp profile
set *FFFFFFFE local-address=192.168.89.1 remote-address=vpn
/interface bridge port
add bridge=bridge comment=defconf ingress-filtering=no interface=ether1
add bridge=bridge comment=defconf ingress-filtering=no interface=wlan1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface l2tp-server server
set use-ipsec=yes
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=lte1 list=WAN
/interface sstp-server server
set default-profile=default-encryption
/interface wireguard peers
add allowed-address=192.168.1.0/24 endpoint-address=\
    xxxxxxxxxxxxxxxx.sn.mynetname.net endpoint-port=13231 interface=wireguard1 \
    public-key="++++++++++++++++++++++++++++++++++++++++++"
/ip address
add address=192.168.25.1/24 comment=defconf interface=bridge network=\
    192.168.25.0
add address=10.255.255.2/30 interface=wireguard1 network=10.255.255.0
/ip cloud
set ddns-enabled=yes
/ip dhcp-server network
add address=192.168.25.0/24 gateway=192.168.25.1 netmask=24
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.25.1 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
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 \
    ipsec-policy=in,ipsec protocol=udp
add action=accept chain=input comment="allow ipsec-esp" protocol=ipsec-esp
add action=accept chain=input dst-port=13231 protocol=udp src-address=\
    ++++++++++++++
add action=accept chain=forward dst-address=192.168.25.0/24 src-address=\
    192.168.1.0/24
add action=accept chain=forward dst-address=192.168.1.0/24 src-address=\
    192.168.25.0/24
add action=accept chain=input comment="allow pptp" disabled=yes dst-port=1723 \
    protocol=tcp
add action=accept chain=input comment="allow sstp" disabled=yes dst-port=443 \
    protocol=tcp
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=input comment=\
    "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
    in-interface-list=!LAN
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 hw-offload=yes
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
add action=drop chain=forward comment=\
    "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
    ipsec-policy=out,none out-interface-list=WAN
add action=masquerade chain=srcnat comment="masq. vpn traffic" src-address=\
    192.168.89.0/24
/ip route
add dst-address=192.168.1.0/24 gateway=wireguard1
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=bridge type=internal
add interface=lte1 type=external
/ppp secret
add name=vpn
/system clock
set time-zone-name=Europe/Zagreb
/system leds
# using RSRP, modem-signal-threshold ignored
add interface=lte1 leds=led1 type=modem-signal
# using RSRP, modem-signal-threshold ignored
add interface=lte1 leds=led2 modem-signal-threshold=-71 type=modem-signal
# using RSRP, modem-signal-threshold ignored
add interface=lte1 leds=led3 modem-signal-threshold=-51 type=modem-signal
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN

How can I point router towards something with static IP, and towards what ? Only thing that i can think of that is constant is DNS server (google for example)

@gigabyte091
this is wrong you didn’t follow the WIKI. from what I can see you did not create your /IP route
R1
/ip
add address=10.255.255.1/30 interface=wireguard1 network=10.255.255.0

/ip route ?
where is the route for wireguard1 ?


add action=accept chain=input dst-port=13231 protocol=udp src-address=
10.3.191.181
What is 10.3.191.81 ?
I see where you going with this you don’t need an src address as you don’t own a public IP on both sides of your tunnel. just change the default port in the WG interface and firewall rules to some random unused port number.

same thing with LTE R2


you don’t include your WG interface as a LAN interface list
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN

include 10.255.255.0/24 in here for ping and troubleshoot.
add allowed-address=192.168.25.0/24 endpoint-address=
+++++++++++++++.sn.mynetname.net endpoint-port=13231 interface=wireguard1 \

You can try but I doubt Google will participate :confused:

On a serious note:
Your tunnel has (at least) 2 ends. One of those need to have a “real” IP address. Static or dynamic with ddns, doesn’t matter. But not CGNAT (ok, it’s also an IP address but not usable for our purposes here).
If you have no devices under your control having such an address, you may have to revert to a public VPN provider which you can then use as pivot point for setting up your VPN.

For the end behind CGNAT, use the internal IP address of ‘the other side’ as endpoint. Since WG is able to set up the tunnel from one end, the other end will follow once connection has been made.

@own3r1138

This is the screenshot from both of my routers, setup from yesterday, so i didn’t change anything yet. I will delete configuration and start over, no problem. So instead 13231 i choose any random port, don’t add src addresses and i can add tunnel IP to allowed addresses.

@holvoetn

I have Public IP from my DSL line ISP provider, it’s not static but i have DDNS address that i use if i need to and small program that is always running and refreshing public IP every 5 minutes. And I have mikrotik’s DDNS address also.
R1 and R2 config.jpg