Navigation

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

    pfsense 2.4.4, haproxy, split dns problem when trying to access server from lan side

    DHCP and DNS
    2
    3
    247
    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.
    • M
      mokozuki last edited by

      I have searched the forums, came a cross a few posts that had similar but not the same problem and have not been able to solve my problem (yet). so now, hopefully someone can point me in a better direction.

      I have pfsense with haproxy set up to redirect traffic coming in on port 80 to port 443 and from there haproxy will check for SNI and forward it to the right backend. backend b1.example.com is a hosting server and hosts websites and mail, it sits on LAN1. When accessing both https and mail (smtp, imap) from external WAN side, everything works fine. But when I am working from inside on LAN2, accessing the websites is no problem, haproxy catches the traffic going out and redirects it back to the server in LAN1. But when I try to access the mailserver, it doens't work, which makes sense, because i don't have NAT relfection turned on or anything of the sorts. Normally I would solve this problem with a split DNS entry (running on the DNS resolver), but as soon as i use a split dns entry for b1.example.com, mail and access to other port work, but access to http or https stop working. It resolves to the internal LAN1 ip, but does not get any reaction from the server.

      Any help solving this problem woul dbe greatly appreciated.

      kdun

      1 Reply Last reply Reply Quote 0
      • M
        mokozuki last edited by

        I "solved" it by setting a split dns entry for the server pointing it to a local ip in subnet b. but also adding a port forward in nat to forward all traffic coming from subnet a with destination the local ip of the server in subnet b and destination port 80 and 443 to be forwarded to the external ip. this way all http(s) traffic will go through haproxy and everything works as expected. it's a bit of a hack, would have preferred to solve this more elegantly. now i will have to create these kind of port forwards for each server that hosts http(s) content.

        1 Reply Last reply Reply Quote 0
        • Derelict
          Derelict LAYER 8 Netgate last edited by

          https://forum.netgate.com/post/878680

          Chattanooga, Tennessee, USA
          The pfSense Book is free of charge!
          DO NOT set a source port in a port forward or firewall rule unless you KNOW you need it!
          Do Not Chat For Help! NO_WAN_EGRESS(TM)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post