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

    OpenVPN through two pfsenses

    Scheduled Pinned Locked Moved OpenVPN
    12 Posts 2 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.
    • D
      dermitdemfuchsgang
      last edited by

      Hi netgate-community,

      I have an issue, maybe somebody out there can help me:

      My task is to create an OpenVPN config file for an Android-Device which is connected to a second pfsense in our office. ๐Ÿ™ˆ

      The architecture looks like this:
      0_1552073804388_Selection_006.png

      I have a NAT-Rule in pfsense 1 (VMSDEV = 10.9.9.245):
      0_1552073919862_Selection_001.png

      This is the OpenVPN-Server on pfsense 1
      0_1552074029567_Selection_004.png

      I put on an OpenVPN-Server on pfsense 2. But it works just if I am in the WIFI of pfsense 1.

      So how can I tell the OpenVPN config file, that it has to pass also the pfsense 1 before it gets to pfsense 2?

      Also just a hint would help me very much. I tried already quite a few things but I didn't get it to work.

      Thank you very much! ๐ŸŒป

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        Why would you have it setup like that? No reason to run 2 in line pfsense like that..

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        1 Reply Last reply Reply Quote 1
        • D
          dermitdemfuchsgang
          last edited by

          It is a simulation for an installation somewhere else. So the second pfsense is a copy of that installation and we test a new software version of our product. Behind the second pfsense is a copy of the server in this installation and the whole pfsense2 config is also the same. And behind the pfsense1 is our office. So it has to be like this ๐Ÿ˜–

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            Well if you want to get openvpn to the 2nd one, then you would have to port forward on the first 1, and have your open vpn client use the IP of your first 1 wan.. This is your typical double nat setup.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 1
            • D
              dermitdemfuchsgang
              last edited by

              Ok, sounds reasonable. Is my actual rule on pfsense 1 ok, like in the screenshot? ๐Ÿค”

              1 Reply Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator
                last edited by johnpoz

                dude you can not run openvpn on 1, and expect to forward the same port to 2??

                Oh your forwarding 1195, to 1194 on 2, while running 1194 on 1..

                Yeah you could do that.. Just point your client to pfsense 1 port 1195

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.8, 24.11

                1 Reply Last reply Reply Quote 1
                • D
                  dermitdemfuchsgang
                  last edited by dermitdemfuchsgang

                  So would it be in theory enough when I change this in the openVPN-config file directly?๐Ÿค”
                  If my openVPN Server on pfsense 2 is configured already.

                  1 Reply Last reply Reply Quote 0
                  • johnpozJ
                    johnpoz LAYER 8 Global Moderator
                    last edited by johnpoz

                    You can do it in the export package in the drop down list..

                    Oh that will allow you to do custom for IP or name but not the port, yeah you need to edit the ovpn file directly

                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                    If you get confused: Listen to the Music Play
                    Please don't Chat/PM me for help, unless mod related
                    SG-4860 24.11 | Lab VMs 2.8, 24.11

                    1 Reply Last reply Reply Quote 1
                    • D
                      dermitdemfuchsgang
                      last edited by dermitdemfuchsgang

                      Hm, could you maybe help me with the correct line? That would be awesome!
                      ๐Ÿ™
                      It would be someththing like:
                      remote WAN1-IP 1195 udp
                      am I right? :-)

                      1 Reply Last reply Reply Quote 0
                      • D
                        dermitdemfuchsgang
                        last edited by

                        It still doesn't work :(

                        1 Reply Last reply Reply Quote 0
                        • johnpozJ
                          johnpoz LAYER 8 Global Moderator
                          last edited by

                          yup its that simple..

                          Export the config from pfsense 2 openvpn... Validate it works by being on the pfsense 2 wan network... Then just change the IP and port so you hit pfsense 1 IP and the 1195 port.

                          If it doesn't work then validate your port forwarding is correct sniff on wan of pfsense 1, sniff on pfsense 1 lan - do you see it sending the traffic?

                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                          If you get confused: Listen to the Music Play
                          Please don't Chat/PM me for help, unless mod related
                          SG-4860 24.11 | Lab VMs 2.8, 24.11

                          1 Reply Last reply Reply Quote 1
                          • D
                            dermitdemfuchsgang
                            last edited by

                            Thank you very much for your help.
                            I had to leave the office now...I will retry it on Monday and let you know.
                            Thank you very, very much! ๐Ÿ’ช

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