Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Site-to-Site OpenVPN with Mikrotik : all ok from mikrotik, can't access mikrotik from pfsense

    Scheduled Pinned Locked Moved OpenVPN
    17 Posts 3 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      RoSs81_ct @peterzy
      last edited by

      @peterzy hi
      And first, thank you!

      yesterday I tried everything with the ip config. I will try today the 2 config you sent me and keep you updated.... There is always something about Mikrotik that never goes as should -.-'

      1 Reply Last reply Reply Quote 0
      • V
        viragomann @peterzy
        last edited by

        @peterzy said in Site-to-Site OpenVPN with Mikrotik : all ok from mikrotik, can't access mikrotik from pfsense:

        @RoSs81_ct You need to play with MTK firewall - you need something like this

        /ip firewall filter add chain=input action=accept protocol=tcp src-address=10.10.11.0/28 in-interface=ovpn-out1 log=no log-prefix="" 
        
        /ip firewall filter add chain=input action=accept protocol=icmp src-address=10.10.11.0/28 in-interface=ovpn-out1 log=no log-prefix="" 
        

        This only allows access from the tunnel subnet and hence only makes sense if you nat the traffic to the VPN IP.
        You will need to allow traffic from the remote LAN subnets, however.

        P 1 Reply Last reply Reply Quote 0
        • P
          peterzy @viragomann
          last edited by

          @viragomann Correct. Not sure what his setup is, but he needs to allow from his LAN network. He wrote somewhere that 10.10.11.0/28 is LAN, but if 10.10.11.0/28 is his tunnel network, the correct allow should be from LAN.

          1 Reply Last reply Reply Quote 0
          • R
            RoSs81_ct
            last edited by RoSs81_ct

            HI to ALL
            and FIRST :) ... Thank you to ALL

            @viragomann , tnx in advance, yes I wrote 10.10.11.0/28 is LAN ( but configured like Virtual IF on pfsense )
            10.10.11.0 was the tunnel class

            needings:

            site B ( with internal lan 192.168.88.9/24 ) accessible from site A ( internal lan 192.168.1.0/24 same as the wan class for pfsense ). i had configure, in fact, virtual IF with OVPN peer2peer to use advanced routing configuration ( i know is very difficult use a p2p with only one interface on pfsense)

            viceversa, at this time, was ok, i can ping and reach host at the site A.

            at this time from PFSENSE can't ping from host pc, tunnel ip and destination lan.

            it's important for me, reach both side of the VPN to share resource form point to other point.

            Try the @peterzy config have no correct result :(

            there is something that i can't see on pfsense..
            the problem i see was pfsense use always the router GTW instead of the vpn tunnel

            3d127cf4-22aa-48b5-bc63-3a131c021ddd-image.png

            first hop 192.168.1.1 and not 10.10.11.1

            try to add a static route but nothing

            51b858c7-0c68-44d5-8dcc-80f126d79038-image.png

            and in my ovpn config

            9ea096b2-d3b5-408f-9d3c-cc165954b131-image.png

            Regards!

            V 1 Reply Last reply Reply Quote 0
            • V
              viragomann @RoSs81_ct
              last edited by

              @RoSs81_ct
              Are you missing the client specific override by any chance?

              R 1 Reply Last reply Reply Quote 0
              • R
                RoSs81_ct @viragomann
                last edited by RoSs81_ct

                @viragomann

                sorry but I can't understand what you mean by your question

                you mean: that I forced OVPN to use local and remote networks in a forced way? I can also remove them.

                thank you in advance

                V 1 Reply Last reply Reply Quote 0
                • V
                  viragomann @RoSs81_ct
                  last edited by

                  @RoSs81_ct
                  VPN > OpenVPN > Client Specific Override
                  I assume, you've configured an SSL OpenVPN? With a shared key site-to-site this is not needed.

                  R 1 Reply Last reply Reply Quote 0
                  • R
                    RoSs81_ct @viragomann
                    last edited by

                    @viragomann

                    you mean this?

                    5aa124a5-2e3c-4692-a18b-348684461b0f-image.png

                    V 1 Reply Last reply Reply Quote 0
                    • V
                      viragomann @RoSs81_ct
                      last edited by

                      @RoSs81_ct
                      Yes.

                      R 1 Reply Last reply Reply Quote 0
                      • R
                        RoSs81_ct @viragomann
                        last edited by

                        @viragomann

                        so i must disable this and in server list take only the peer2peer?

                        regards

                        V 1 Reply Last reply Reply Quote 0
                        • V
                          viragomann @RoSs81_ct
                          last edited by

                          @RoSs81_ct
                          In the server list you have to select the respective server for which you want to configure a CSO.

                          You didn't reply to the VPN type. Maybe there is an easier solution.

                          R 1 Reply Last reply Reply Quote 0
                          • R
                            RoSs81_ct @viragomann
                            last edited by

                            @viragomann

                            unfortunately, nothing change :(

                            I'm considering the idea of ​​adding a mikrotik at the other site and adding the IPs of a new internal lan to the necessary clients.

                            works on a pfsense with a single IF was stressful. :)

                            thank you so much to ALL :)

                            V 1 Reply Last reply Reply Quote 0
                            • V
                              viragomann @RoSs81_ct
                              last edited by

                              @RoSs81_ct
                              Still not clear, which authentication type you've configured.
                              If it's an SSL AND you don't need to connect multiple clients to the server you can simply set the tunnel mask to /30. With this the CSO isn't needed.

                              Otherwise you have to ensure, that the CSO is applied properly and that the route are added. You can check this in the OpenVPN log, however, you have to enhance the verbosity level to 4 first and reconnect the client.

                              R 1 Reply Last reply Reply Quote 0
                              • R
                                RoSs81_ct @viragomann
                                last edited by

                                @viragomann

                                You are right, i forgot it.
                                Tls/ssl with certificate and pre shared key

                                Connection between the 2 side was ok, from site b ( internal lan 192.168.88.0 ) i can reach all the host of site A pfsense included .

                                I have one client on site A must accept 3 o 4 connection at same time, rdp session for a software.

                                Tomorrow, if I have time, i can post some other screenshot of pfsense vpn config for the p2p.

                                Best regards and thank you so much.

                                Have a nice WE!

                                1 Reply Last reply Reply Quote 0
                                • R
                                  RoSs81_ct
                                  last edited by

                                  Hi to all

                                  so, little RECAP

                                  SITE A:
                                  Operator Router-> SWITCH -> ESXi with PFsense
                                  Public IP -> Internal Lan 192.168.1.0/24 -> PFSENSE wan 192.168.1.240 with GTW 192.168.1.1 and virtual Interface ovpn peer2peer

                                  SITE B:
                                  Operator Router-> Mikrotik -> Internal LAN
                                  Public IP -> wan 192.168.8.1 - LAN 192.168.88.1 -> Internal Lan 192.168.88.1/24

                                  Peer to Peer tunnel 10.10.11.0/28 ( site A 10.10.11.1 / site B 10.10.11.2)
                                  Connection OK between site
                                  ping - other service from B to A -> OK
                                  ping - other service from A to B -> KO

                                  PFSENSE CONFIG:
                                  29216526-883e-4dcf-be61-40e878d39ca4-image.png
                                  7512a6dc-e92b-4e3e-b89e-7c34e5d06f27-image.png
                                  6c54caac-b910-4b03-ad33-d67d0fddbc9f-image.png
                                  e4dd2f8a-3d7c-423c-bb16-400bbe6aae84-image.png
                                  0d34858e-90ff-4c9a-80c5-82a955a1864f-image.png
                                  a38cbe88-9c96-4f29-9d8d-863c109cc347-image.png

                                  With and Without CSO tested, but nothing change.

                                  NAT
                                  925d14c9-775d-4135-99b7-05c7910ba1a2-image.png

                                  Rules
                                  b0188b3d-c32f-4b06-96c4-c3e98b48c821-image.png

                                  2e40e12b-3fc8-441c-8e79-1dcf651b606d-image.png

                                  ROUTING
                                  69cb7bb0-c088-4e88-a8c3-619c3f95dce1-image.png
                                  bbda0e24-58d8-484c-b538-dc7b43ad78ae-image.png

                                  SITE B: MIKROTIK

                                  5d692e75-0ebe-4a90-a297-6944770da4e3-image.png
                                  7bb9e00c-ba65-4c21-9bc2-48d1c9d75a53-image.png


                                  Sorry for all the photos, but, it's to understand how the 2 devices were configured.
                                  Any help is welcome, I don't know what else to check or other configurations to try.
                                  Esxi has no rules on the internal switch.

                                  **thank you so much for all the advice already writed, and have a nice new week.

                                  ANDDD sorry for my English XD.**

                                  REGARDS

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post
                                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.