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

    HA proxy on pfsense cannot working

    Scheduled Pinned Locked Moved HA/CARP/VIPs
    19 Posts 4 Posters 2.9k 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.
    • N
      netblues @usaiat
      last edited by

      @usaiat How about nat configuration?

      U 1 Reply Last reply Reply Quote 0
      • U
        usaiat @netblues
        last edited by

        @netblues Which interface do I have to/address do I have to NAT

        1 Reply Last reply Reply Quote 0
        • N
          netblues
          last edited by

          Outbound nat, on the interface traffic is leaving pf. In a ha environment, the vip with manual outbound.
          In general, traffic must first reach the interface and then nat rules take effect.
          So eg. you have to allow outbound at the lan level and nat it at the wan level.

          1 Reply Last reply Reply Quote 0
          • M
            Mr.Trieu @usaiat
            last edited by

            @usaiat I resolved this issue. You must nat forward traffic from LAN to internet redirect to members pfsense.
            e.g: from pc (192.168.20.111) to internet with proxy(20.254) ====> you nat forwarding redirect through pfsense1(20.101) and nat forwarding redirect through pfsense2(20.100) ===> successs

            U 1 Reply Last reply Reply Quote 0
            • U
              usaiat @Mr.Trieu
              last edited by

              @Mr-Trieu Sorry I'm confused here. I thought with HA you just do NAT configuration on the primary ? Also is it Outbound NAT or Port Forward NAT as @netblues is suggesting Outbound NAT

              N 1 Reply Last reply Reply Quote 0
              • U
                usaiat
                last edited by

                Here is my IP schema for my HA

                e8c322a8-96a4-411f-8aa3-d89a7fdf7c6f-image.png

                1 Reply Last reply Reply Quote 0
                • U
                  usaiat
                  last edited by

                  And I've got a host configured as 192.168.8.252/24 to use 192.168.8.5 as its gateway and DNS.

                  1 Reply Last reply Reply Quote 0
                  • N
                    netblues @usaiat
                    last edited by netblues

                    @usaiat said in HA proxy on pfsense cannot working:

                    @Mr-Trieu Sorry I'm confused here. I thought with HA you just do NAT configuration on the primary ? Also is it Outbound NAT or Port Forward NAT as @netblues is suggesting Outbound NAT

                    Nat rules are propagated, so yes, you do them on primary (unless for special purposes you don't want to replicate settings)
                    Outbound nat is for connections leaving pf sense .
                    port forward is for incoming connections typically from the Internet

                    What is your issue?

                    1 Reply Last reply Reply Quote 0
                    • U
                      usaiat
                      last edited by

                      Thanks @netblues . My issue is I just couldn't access internet from a client using the pfsense LAN VIP as its gateway and DNS (with DNS forwarder enabled). From pfsense itself I can ping internet and name lookup as well. Even if I put back the “Default LAN > any” rule right on the top of my rules internet still doesn't work.

                      I've also followed this step on the pfSense book

                      40c576a5-a3a8-46a3-839c-856d8321aeef-image.png

                      Probably something else I'm missing ?

                      N 1 Reply Last reply Reply Quote 0
                      • N
                        netblues @usaiat
                        last edited by

                        @usaiat Probably there is a misconfiguration somewhere.
                        Please post your nat and firewall rules, not the ones from the book.
                        And a network diagram, if there is anything special apart from two nodes a carp wan, a carp vip and a sync interface...

                        1 Reply Last reply Reply Quote 0
                        • U
                          usaiat
                          last edited by

                          This is my setup

                          d51f000a-aa9f-44b2-b661-7def2afd4a74-image.png

                          LAN rule below. WAN has only the default Block private networks and loopback addresses and Block bogon networks rule

                          0b361b47-432a-4b8d-a412-1ffb6638ec82-image.png

                          Manual Outbound NAT below

                          0dc02daa-f31a-43c0-b8d8-bd4bc3d31723-image.png
                          16c57dd5-bd1a-4201-b0a6-9aaa80f6fde6-image.png

                          1 Reply Last reply Reply Quote 0
                          • N
                            netblues
                            last edited by

                            You are not allowing your lan to pass.
                            Only ping is allowed (and has some traffic matched too)
                            Lan address is the ip of pf. What you need is lan net
                            And I do hope Allowed_tcp ports says something meaningful
                            And your nat rules is a mess..
                            192.168.0.0/16 with nat address 202.0.155.252 is the only thing you need
                            (for lan.) also localhost to wan is needed for pfsense internet access
                            if not using ipsec you can eliminate all isakmp entries
                            This is a ha setup, don't rely too much on autocreated rules :)
                            As a rule of thumb, first establish basic connectivity and then start doing smarter things.

                            U 1 Reply Last reply Reply Quote 1
                            • U
                              usaiat @netblues
                              last edited by usaiat

                              @netblues That fix it for me. LAN rule - change from LAN address to LAN net. By the way, those NAT rules are the automatically created rules. So I just change all those on WAN interface to use my WAN VIP

                              Thank you so much

                              N 1 Reply Last reply Reply Quote 0
                              • N
                                netblues @usaiat
                                last edited by

                                @usaiat Well, the automatic nat rules are there to ease first steps, however they do create clutter. e.g if there is no ipsec vpn, there is no need for port 500 and isakmp.
                                Also complete rfc1918 ranges are allowed, and even though this doesn't do much harm, makes the rules more difficult to read.
                                In practice you need nat rules for your lan pc's and for pfsense to reach the internet itself.
                                Nothing else.

                                U 1 Reply Last reply Reply Quote 1
                                • U
                                  usaiat @netblues
                                  last edited by

                                  @netblues Sure, thanks ☺

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