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

    Load Balancer Question

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 3 Posters 1.7k 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.
    • P
      peterdh44
      last edited by

      Is it possible to setup the load balancing function to work on the LAN subnet from machines on the LAN subnet?

      I want to load balance MySQL queries against 1 of 2 replicas from apache servers on the same subnet.  The apache servers are loadbalanced from the Internet and that works fine.

      Apache 1 10.1.1.1
      Apache 2 10.1.1.2
      Virtual IP for Apache = 24.24.55.55 (This is made up)
      MySQL 1 10.1.1.3
      MySQL 2 10.1.1.4
      Virtual IP for MySQL = 10.1.1.5

      I want either Apache 1 or 2 to query 10.1.1.5 and have that redirected to either MySQL 1 or 2.

      The load balanced IP works when we are attached via VPN and the traffic flows across the LAN interface from the PPTP interface.

      TIA

      Peter

      1 Reply Last reply Reply Quote 0
      • GruensFroeschliG
        GruensFroeschli
        last edited by

        I'm not sure if this works but you could:
        Enable NAT reflection under advanced
        Access via the public IP.

        I dont know if this works, but you can reflect access to normal portforwards like this.
        Maybe it works as well for server-balancing-pools

        We do what we must, because we can.

        Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

        1 Reply Last reply Reply Quote 0
        • ?
          Guest
          last edited by

          NAT reflection won't do this.

          The solution here is to put those devices into a DMZ and then load balance your traffic from the LAN to the the DMZ devices.  This will work very well with a very minor network reconfiguration.

          1 Reply Last reply Reply Quote 0
          • P
            peterdh44
            last edited by

            Thanks for the feedback.

            Unfortunately we can't put them in a separate DMZ because these DB servers are also sharing hardware with the Apache servers.

            What I can do is hookup eth1 and assign those IPs to the MySQL slaves and put them on a different VLAN and see if the LAN port will talk to both subnets.

            Peter

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