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

    Issue with local Ubuntu VPN behind PFsense

    Scheduled Pinned Locked Moved NAT
    13 Posts 2 Posters 2.1k Views 2 Watching
    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.
    • A Offline
      alexanderjh @Gertjan
      last edited by

      @Gertjan

      Thanks for reply.

      The VPN i have issue with is a separate instance, behind PFsense that worked before PFsense. This means i know my ISP allows port forwarding, i simply changed the IP from my VPN in the PF rules to the PFsenseIP (as my VPN was now behind PFsenseo on a new IP).

      As stated - Port forwards are set (192.168.1.2) <- WAN IP of my PFSENSE.
      I also added 192.168.1.2 as DMZ on my ISP router!

      Then i have a NAT setup listening for, the HTTPS/HTTP forwarding is working for web traffix to the web server on the same VPN instance.

      1c4ce339-999b-4356-8015-f51d8333c392-image.png

      8bdfd83f-3cff-4437-a802-78cc3c1b7fbc-image.png

      I have also a VPN CLIENT on the PFsense box that is routing specific MAC client to Swiss break out. i mention this as i just want to be sure it is not a cause of any issues.

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG Offline
        Gertjan @alexanderjh
        last edited by

        @alexanderjh

        This :

        2e6e2d9f-47d9-4feb-b5e1-324b89132270-image.png

        the first firewall rule, the one that says : 4/4KiB, that is a firewall rule not being part of a NAT rule ? Right ?
        Something tells me that that rule 'gobs' all incoming IPv4 and sends it to ... black hole ?

        Your IPv4 ESP doesn't mention a port ... maybe ESP doesn't needs port (like ICMP) - I can't tell.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          alexanderjh @Gertjan
          last edited by

          @Gertjan

          ah yes i move this one top or bottom , just trying to "catch everything" as you say but it didn't work i should delete it.

          A 1 Reply Last reply Reply Quote 0
          • A Offline
            alexanderjh @alexanderjh
            last edited by

            This post is deleted!
            GertjanG 1 Reply Last reply Reply Quote 0
            • GertjanG Offline
              Gertjan @alexanderjh
              last edited by

              @alexanderjh said in Issue with local Ubuntu VPN behind PFsense:

              I also enabled NAT reflection on the rule

              Normally not needed.
              Use 'http://the-host-name-on-your-lan' and you can connect to that host. This traffic will not even been seen or reach pfSense as it is LAN (device) to LAN (device) traffic.

              @alexanderjh said in Issue with local Ubuntu VPN behind PFsense:

              also connect to the VPN (for test) on the LAN

              Same thing, that's (pfSEnse) LAN (device) to (pfSense) LAN (device) traffic and never passes trough (reaches) pfSense.

              No "help me" PM's please. Use the forum, the community will thank you.
              Edit : and where are the logs ??

              A 1 Reply Last reply Reply Quote 0
              • A Offline
                alexanderjh @Gertjan
                last edited by

                @Gertjan

                thanks and yes appreciate that on LAN its simple bnut also a good test to prove that my VPN server didn't randomly break :)

                I really struggle to see where issue is. Other option is to. move my VPN outside of the PFsense and back onto the "WAN" IP range but then this will be annoying as i want to access the "LAN" network when connected to that VPN. I don't see why its being so dificult!

                GertjanG 2 Replies Last reply Reply Quote 0
                • GertjanG Offline
                  Gertjan @alexanderjh
                  last edited by

                  @alexanderjh said in Issue with local Ubuntu VPN behind PFsense:

                  on LAN its simple bnut also a good test to prove that my VPN server didn't randomly break

                  Be aware : most server device, like a Windows PC with RDP activated will only accept connections from the local LAN, so the 192.168.0.x network.
                  That is, the RDP service will accept connections from everywhere but the windows firewall will block all non-local attemps.
                  Whne you set up 'any' server device, like a web server on some LAN device, check if the firewall of this devices accepts connection from 'every where' and not only LAN.
                  That said, this isn't probably your issue.

                  No "help me" PM's please. Use the forum, the community will thank you.
                  Edit : and where are the logs ??

                  1 Reply Last reply Reply Quote 0
                  • GertjanG Offline
                    Gertjan @alexanderjh
                    last edited by Gertjan

                    @alexanderjh said in Issue with local Ubuntu VPN behind PFsense:

                    I really struggle to see where issue is.

                    The very first thing I test when dealing with NAT rules : I set them up, then de de-activate the wifi on my phone, and connect to the "ISP WAN IP" using a browser, VPN client or RDP tool and check here :

                    6cb00b1f-41e5-40b3-9646-92de40ce839c-image.png

                    where I can see the firewall rule in question receives traffic = the counters start to raise = the rule is actually used.
                    If these stay 0/0 then you have a solid proof that your traffic isn't reaching the pfSense WAN interface.

                    No "help me" PM's please. Use the forum, the community will thank you.
                    Edit : and where are the logs ??

                    A 1 Reply Last reply Reply Quote 0
                    • A Offline
                      alexanderjh @Gertjan
                      last edited by alexanderjh

                      @Gertjan Yeah this is really tricky with UDP.

                      I can see the HTTP and HTTPS traffic hitting the WAN, being passed to the LAN and then serving the webpages internally and externally. I set up the same rules except of course UDP and 4500/500 for the VPN and NOTHING... really frustrating!

                      UDP port checker online says they are open..... Hmm i guess no easy answer and i just need to keep playing around!

                      (for what its worth, my VPN Ubuntu box does not see any attempts on its UFW logs or strong swan, other then when internally connected or serving web pages that is working...

                      ffc29d16-ec07-4018-a6a5-9d98461caed9-image.png

                      A GertjanG 2 Replies Last reply Reply Quote 0
                      • A Offline
                        alexanderjh @alexanderjh
                        last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • GertjanG Offline
                          Gertjan @alexanderjh
                          last edited by

                          @alexanderjh said in Issue with local Ubuntu VPN behind PFsense:

                          this is really tricky with UDP.

                          The thing is, I use the pfSense Openvn server, that uses the default UDP and default 1194 port.

                          I don't know anything about "IPSEC" and "strongwan".
                          What protocol number it is, if it uses ports, etc

                          Keep mind that your issue isn't pfSense related right now.
                          Here : proof :

                          20acf017-6cdd-4194-925f-e19a72353f95-image.png

                          your VPN traffic never even reaches the pfSense WAN port. It can't redirect what it didn't receive ^^
                          That said (example) : if IPSEC is using IPv4 and UDP, and port '45000' as a destination.

                          Your rules do work fine for traffic with destination port 80 and 443, TCP, IPv4 - the web server traffic.

                          No "help me" PM's please. Use the forum, the community will thank you.
                          Edit : and where are the logs ??

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