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

Allowing only LAN users while blocking all others.

Scheduled Pinned Locked Moved Cache/Proxy
8 Posts 3 Posters 803 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.
  • T
    tomasenskede
    last edited by Oct 21, 2023, 10:32 PM

    I'm looking to configure my HAproxy to only allow access to specific services for local LAN users. Despite trying various ACL configurations, I haven't been able to achieve the desired outcome. Does anyone have a sample configuration to restrict site access exclusively to users within the 192.168.0 network?

    I assume this should be implemented within the backend configuration, particularly in the Access Control Lists and Actions section. Is my understanding correct?
    4b6b5ca9-0720-4708-85ba-78309264782b-image.png

    I'm grateful for all the suggestions, tips, and ideas that have been shared to help me work towards a solution. Thank you!

    M J 2 Replies Last reply Oct 22, 2023, 12:01 AM Reply Quote 0
    • M
      michmoor LAYER 8 Rebel Alliance @tomasenskede
      last edited by Oct 22, 2023, 12:01 AM

      @tomasenskede quite simple. There’s an option to use an Alias when building the ACL. I utilize this when wanting to keep certain resources available only to my net admin vlan

      Firewall: NetGate,Palo Alto-VM,Juniper SRX
      Routing: Juniper, Arista, Cisco
      Switching: Juniper, Arista, Cisco
      Wireless: Unifi, Aruba IAP
      JNCIP,CCNP Enterprise

      T 1 Reply Last reply Oct 22, 2023, 6:52 AM Reply Quote 0
      • J
        johnpoz LAYER 8 Global Moderator @tomasenskede
        last edited by Oct 22, 2023, 12:09 AM

        @tomasenskede who are you wanting to block exactly? For example if you don't want public to get to it, why would you even have it listen on your wan, or why would you create the firewall.

        If you don't want some other local network to use it, just block that network or IP from talking to the frontend IP and port.

        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.7.2, 24.11

        M 1 Reply Last reply Oct 22, 2023, 12:21 AM Reply Quote 0
        • M
          michmoor LAYER 8 Rebel Alliance @johnpoz
          last edited by Oct 22, 2023, 12:21 AM

          @johnpoz I think it all depends on what the network looks like if a firewall ACL is practical.
          So for example my HA Proxy listen IP on the LAN is 192.168.50.250. All my internal services sit behind that VIP. That means if i have lets say dns.example.com and password.example.com there is no way to block users to the specific service using pf rules (actually as im writing this you could by putting the hostname in the source field). Another way is to use the built in feature to use an Alias within HA Proxy which would be my preference as you dont need to update multiple interfaces (assuming a routed network or vlans) and just update the Alias.
          Different ways to cut up an onion i suppose

          Firewall: NetGate,Palo Alto-VM,Juniper SRX
          Routing: Juniper, Arista, Cisco
          Switching: Juniper, Arista, Cisco
          Wireless: Unifi, Aruba IAP
          JNCIP,CCNP Enterprise

          J 1 Reply Last reply Oct 22, 2023, 12:25 AM Reply Quote 0
          • J
            johnpoz LAYER 8 Global Moderator @michmoor
            last edited by johnpoz Oct 22, 2023, 12:28 AM Oct 22, 2023, 12:25 AM

            @michmoor Yeah I agree there would be times where you would want/need to use the acls in a specific setup, and even limit or allow on source IPs, etc.. Not saying its not a viable tool to use when circumstance warrants it.

            I am just curious in this scenario.. If I only want locals networks or IPs to use my haproxy - why would I even allow public to talk to it in the first place. Or if only want specific locals to access it, then again its quite possible could just be done with firewall rules..

            Different ways to cut up an onion i suppose

            Or skin the cat for sure - but if you don't know the breed of the cat, you can't actually determine all the ways to skin it.. Or which way might be the easiest ;)

            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.7.2, 24.11

            T 1 Reply Last reply Oct 22, 2023, 6:54 AM Reply Quote 0
            • T
              tomasenskede @michmoor
              last edited by Oct 22, 2023, 6:52 AM

              @michmoor

              Alias here?
              b69c05e6-af25-4b91-939b-5b17aeecb181-image.png

              1 Reply Last reply Reply Quote 0
              • T
                tomasenskede @johnpoz
                last edited by tomasenskede Oct 22, 2023, 6:55 AM Oct 22, 2023, 6:54 AM

                @johnpoz said in Allowing only LAN users while blocking all others.:

                @michmoor Yeah I agree there would be times where you would want/need to use the acls in a specific setup, and even limit or allow on source IPs, etc.. Not saying its not a viable tool to use when circumstance warrants it.

                I am just curious in this scenario.. If I only want locals networks or IPs to use my haproxy - why would I even allow public to talk to it in the first place. Or if only want specific locals to access it, then again its quite possible could just be done with firewall rules..

                Different ways to cut up an onion i suppose

                Or skin the cat for sure - but if you don't know the breed of the cat, you can't actually determine all the ways to skin it.. Or which way might be the easiest ;)

                I have multiple services that I make accessible through HAproxy, and they function well. However, there are several services that I prefer not to make public, and I'd like to restrict access to them to only the LAN-side, rather than the WAN-side.

                1 Reply Last reply Reply Quote 0
                • T
                  tomasenskede
                  last edited by Oct 22, 2023, 7:00 AM

                  6cf0e84c-91b7-4081-b7f1-b828b07fd80c-image.png
                  This isn't functioning correctly. Am I heading in the right direction?

                  1 Reply Last reply Reply Quote 0
                  8 out of 8
                  • First post
                    8/8
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                    This community forum collects and processes your personal information.
                    consent.not_received