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

    OpenVPN server *behind* pfSense firewall - cannot reach Internet

    Scheduled Pinned Locked Moved OpenVPN
    16 Posts 3 Posters 1.3k 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.
    • V
      viragomann @soonerdave
      last edited by

      @soonerdave said in OpenVPN server *behind* pfSense firewall - cannot reach Internet:

      I host an OpenVPN server box (in my private network), NOT the OpenVPN within pfSense) that a friend of mine connects to remotely.

      Such a set up needs either

      • a segregated transit network between the VPN box and pfSense
      • a masquerading rule on the VPN box or
      • a static route on any of your local devices, he should be able to access.

      Did you configure either of these?

      In your case, I think, masquerading on the box would be best / easiest solution, as there is obviously only one client connecting to the VPN.

      For internet access over the VPN, you need also an outbound NAT rule on pfSense for the VPN tunnel network if you don't masquerade the traffic on the box.

      S 1 Reply Last reply Reply Quote 1
      • S
        soonerdave @viragomann
        last edited by

        @viragomann said in OpenVPN server *behind* pfSense firewall - cannot reach Internet:

        @soonerdave said in OpenVPN server *behind* pfSense firewall - cannot reach Internet:

        I host an OpenVPN server box (in my private network), NOT the OpenVPN within pfSense) that a friend of mine connects to remotely.

        Such a set up needs either

        • a segregated transit network between the VPN box and pfSense
        • a masquerading rule on the VPN box or
        • a static route on any of your local devices, he should be able to access.

        Did you configure either of these?

        In your case, I think, masquerading on the box would be best / easiest solution, as there is obviously only one client connecting to the VPN.

        For internet access over the VPN, you need also an outbound NAT rule on pfSense for the VPN tunnel network if you don't masquerade the traffic on the box.

        The masquerading rule rings a bell as something I had to do in the last time I had to make some changes to this setup eons ago. Obviously this isnt something I do every day.

        Let me try to retrieve some notes on this and see if that helps me track down what I've done wrong. Thanks.

        S 1 Reply Last reply Reply Quote 0
        • S
          soonerdave @soonerdave
          last edited by

          I found the firewall script I had running on the old system where this setup was working (and had been for some time). It definitely has some custom masquerade rules, so I've just got to figure out the right way to covert them into PFsense.

          Will advise.

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

            @soonerdave
            The masquerading should be done on the VPN box.
            This means, it translates the source IP in packets, which are going into your network, into its local IP.

            S 1 Reply Last reply Reply Quote 0
            • S
              soonerdave @viragomann
              last edited by

              @viragomann Right or wrong, that's not how it was done before. It was done in my firewall.

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

                @soonerdave
                I‘ve no idea, how you can solve this only on the router. I mentioned the options I know above.
                But if you have it come back and let us know, please.

                S 2 Replies Last reply Reply Quote 0
                • S
                  soonerdave @viragomann
                  last edited by

                  @viragomann Oh, believe me, I feel totally stupid for not having done a more comprehensive job of documenting the previous, working firewall setup. I documented only the ports I forwarded, but not the masquerade rules. Totally dummy on me.

                  1 Reply Last reply Reply Quote 0
                  • S
                    soonerdave @viragomann
                    last edited by

                    @viragomann SOLVED!! And props to you for nailing the problem.

                    My cohort who actually uses the box messaged me this morning and told me he had to fix the NAT on his box with the new IP it had been assigned. I have never set up an OpenVPN device for my own purposes, so I wasn't aware there was local NATting going on. I just made sure the firewall was opened up as needed, which is why I assumed I'd done something wrong on my side when I moved the setup to pfSense. Had I preserved his IP none of this would have happened. I've learned something new, and that's a good thing.

                    Problem completely solved and THANKS to everyone here who took the time to reply and help!!

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

                      @soonerdave said in OpenVPN server *behind* pfSense firewall - cannot reach Internet:

                      told me he had to fix the NAT on his box with the new IP it had been assigned.

                      You wrote above, that nothing was changed in your notwork except the new firewall. If the box has a NAT masquerading rule, it will have an IP stated for this, since it might not have a variable for the interface IP like pfSense does.
                      You should have mentioned that you have created a new subnet.

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        soonerdave @viragomann
                        last edited by soonerdave

                        @viragomann I didn't create a new subnet. His box was assigned a new IP from the same subnet that was recreated in my new server setup. If I had maintained the same IP on the new server, I have a sneaking suspicion we'd have had no problem at all.

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

                          @soonerdave said in OpenVPN server *behind* pfSense firewall - cannot reach Internet:

                          His box was assigned a new IP from the same subnet that was recreated in my new server setup

                          From DHCP?
                          If so you should set a static mapping for his MAC.

                          S 1 Reply Last reply Reply Quote 0
                          • S
                            soonerdave @viragomann
                            last edited by

                            @viragomann That was one of the first things I did when I rebuilt the network (static assignment). It wasnt DHCP, I just assigned it from a new block of addresses I'd reserved for a few devices. It just didn't remotely occur to me there would be dependencies on that IP within that client box. That just goes back to my lack of familiarity with the internals of the OpenVPN server box he is using. Hey, at least I learned something.....

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