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

IP Aliases not resolving properly

Scheduled Pinned Locked Moved DHCP and DNS
10 Posts 4 Posters 986 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.
  • L
    lifeboy
    last edited by lifeboy Jun 1, 2021, 10:39 AM Jun 1, 2021, 10:33 AM

    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 J 2 Replies Last reply Jun 1, 2021, 10:41 AM Reply Quote 0
    • V
      viragomann @lifeboy
      last edited by Jun 1, 2021, 10:41 AM

      @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.

      L 2 Replies Last reply Jun 1, 2021, 10:44 AM Reply Quote 2
      • J
        JeGr LAYER 8 Moderator @lifeboy
        last edited by JeGr Jun 1, 2021, 10:45 AM Jun 1, 2021, 10:42 AM

        @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.

        L 1 Reply Last reply Jun 1, 2021, 10:47 AM Reply Quote 2
        • L
          lifeboy @viragomann
          last edited by Jun 1, 2021, 10:44 AM

          @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
          • L
            lifeboy @JeGr
            last edited by Jun 1, 2021, 10:47 AM

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

            J 1 Reply Last reply Jun 1, 2021, 10:49 AM Reply Quote 0
            • J
              JeGr LAYER 8 Moderator @lifeboy
              last edited by Jun 1, 2021, 10:49 AM

              @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
              • L
                lifeboy @viragomann
                last edited by Jun 1, 2021, 4:15 PM

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

                J V 2 Replies Last reply Jun 1, 2021, 4:26 PM Reply Quote 0
                • J
                  johnpoz LAYER 8 Global Moderator @lifeboy
                  last edited by Jun 1, 2021, 4:26 PM

                  @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

                  L 1 Reply Last reply Jun 1, 2021, 4:37 PM Reply Quote 1
                  • L
                    lifeboy @johnpoz
                    last edited by Jun 1, 2021, 4:37 PM

                    "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 Jun 1, 2021, 4:51 PM

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

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