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

    IP Aliases not resolving properly

    DHCP and DNS
    4
    10
    970
    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.
    • lifeboyL
      lifeboy
      last edited by lifeboy

      We need to allow email traffic to outlook.office365.com on port 993, which is pretty standard. However, in classic Microsoft style, they seem to be breaking the rules of DNS. Running 'dig' from various DNS servers, gives different answers:

      # dig +short outlook.ms-acdc.office.com A
      jnb-efz.ms-acdc.office.com.
      52.98.20.146
      52.98.20.178
      52.98.20.130
      

      however

      # dig +short @8.8.8.8 outlook.ms-acdc.office.com A
      LHR-efz.ms-acdc.office.com.
      52.97.211.194
      52.97.211.130
      52.97.146.162
      52.97.146.210
      

      And a different answer from the tables in pfSense

      Outlook_mail_servers Table
      IP Address	
      52.98.16.210	
      52.98.16.226	
      52.98.16.242	
      2603:1006:1::2	
      2603:1006:1:1::2	
      2603:1006:1:b::2
      

      I have cleared the table contents, but it populated with new different ip addresses again.

      What is happening and how do I coerce aliases into working they way I expect it to work?

      V JeGrJ 2 Replies Last reply Reply Quote 0
      • V
        viragomann @lifeboy
        last edited by

        @lifeboy
        I created this alias for outlook.office365.com:
        0f3a07a2-aede-47e8-9728-5a2eeb20a692-grafik.png
        Got it from an MS page in the Web and works without issues.

        lifeboyL 2 Replies Last reply Reply Quote 2
        • JeGrJ
          JeGr LAYER 8 Moderator @lifeboy
          last edited by JeGr

          @lifeboy IMHO that's nothing to do with "MS style breaking rules" but simply with Anycast/Geolocated DNS resolvers that actually try to serve you IPs that are more geo-located near you and thus better suited then others. That's happening all over the place with Google, Youtube and nearly every other big company that uses a CDN in between.

          You can't resolve such DNS fqdn with normal means of an Alias in pfSense as it can vary every few minutes depending on what DNS server is responding to you and what its answers are to you. So just creating an alias will change IPs every 15m.

          Edit: @viragomann got in between ;) Yeah what virago says. Just have a look at MS Knowledgebase, they have a list of Names and IPs of all their services and which IP blocks they are using for what. You can simply use that hardcoded like @viragomann in an alias or put the JSON/text list from Microsoft in a tool like pfblockerNG and let it update it automatically.

          Cheers

          Edit: Here's the worldwide endpoints list -> https://docs.microsoft.com/en-us/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide
          That's the list in JSON format: https://endpoints.office.com/endpoints/worldwide?clientrequestid=b10c5ed1-bad1-445f-b386-b919946339a7

          Don't forget to upvote ๐Ÿ‘ those who kindly offered their time and brainpower to help you!

          If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

          lifeboyL 1 Reply Last reply Reply Quote 2
          • lifeboyL
            lifeboy @viragomann
            last edited by

            @viragomann, thanks.

            Thanks a pretty serious list of addresses, but then I suppose that's what happens when you have to serve as much mail at they do!

            1 Reply Last reply Reply Quote 0
            • lifeboyL
              lifeboy @JeGr
              last edited by

              @jegr, I get it, yes, it's the CDN... (should have known that, clearly having a blonde moment there :-) )

              JeGrJ 1 Reply Last reply Reply Quote 0
              • JeGrJ
                JeGr LAYER 8 Moderator @lifeboy
                last edited by

                @lifeboy said in IP Aliases not resolving properly:

                @jegr, I get it, yes, it's the CDN... (should have known that, clearly having a blonde moment there :-) )

                As we all sometimes do :) No problem there. ;)

                Don't forget to upvote ๐Ÿ‘ those who kindly offered their time and brainpower to help you!

                If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

                1 Reply Last reply Reply Quote 0
                • lifeboyL
                  lifeboy @viragomann
                  last edited by

                  @viragomann, please share how you added these as an alias. When I add them they get expanded and it's more the 5000 items...

                  johnpozJ V 2 Replies Last reply Reply Quote 0
                  • johnpozJ
                    johnpoz LAYER 8 Global Moderator @lifeboy
                    last edited by

                    @lifeboy The link provided by @JeGr should have all the possible netblocks used for different aspects of outlook.com and office365.com

                    Which ones you specific need will depend on exactly what your doing.

                    If you use the network alias they will not expand.
                    https://docs.netgate.com/pfsense/en/latest/firewall/aliases.html#network-aliases

                    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

                    lifeboyL 1 Reply Last reply Reply Quote 1
                    • lifeboyL
                      lifeboy @johnpoz
                      last edited by

                      "If you use the network alias they will not expand."

                      @johnpoz, thanks, that's what I was looking for.

                      1 Reply Last reply Reply Quote 0
                      • V
                        viragomann @lifeboy
                        last edited by

                        @lifeboy
                        I used alias type IP networks, @johnpoz already solved the mystery.

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