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

Crashes when try to edit alias

General pfSense Questions
3
21
1.5k
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.
  • C
    cdsJerry
    last edited by Oct 19, 2023, 8:54 PM

    I had discovered that my Alias for Cloudflare was out of date. I got a list of their IPs from them and was going to add them to the Alias to replace the old addresses. I manually deleted all the old addresses, added one new IP, then saved the Alias and the re-opened it. I then went on to add more of their IPs one set at a time as 103.22.200.0/22 I would save after each set.

    However after one set the page would not reload. The Dashboard presented a crash report saying it was out of memory but the memory slider thingy was at 14%. I tried to open the alias again but I get nothing but a blank page and then a new crash report.

    Am I going to need to delete the entire Alias and rule placement then start over? Is there a limit as to how many IPs can be in an alias because Cloudflare has a ton of them?

    Here's the log:
    [19-Oct-2023 13:39:27 America/New_York] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 22182216 bytes) in /usr/local/www/classes/Form/Section.class.php on line 134
    [19-Oct-2023 16:33:57 America/New_York] PHP Fatal error: str_ireplace(): Cannot use output buffering in output buffering display handlers in /usr/local/www/csrf/csrf-magic.php on line 161
    [19-Oct-2023 16:34:19 America/New_York] PHP Fatal error: str_ireplace(): Cannot use output buffering in output buffering display handlers in /usr/local/www/csrf/csrf-magic.php on line 161
    [19-Oct-2023 16:34:39 America/New_York] PHP Fatal error: str_ireplace(): Cannot use output buffering in output buffering display handlers in /usr/local/www/csrf/csrf-magic.php on line 161

    J 1 Reply Last reply Oct 20, 2023, 2:50 AM Reply Quote 0
    • S
      stephenw10 Netgate Administrator
      last edited by Oct 19, 2023, 9:23 PM

      In what pfSense version?

      The initial memory error implies the gui tried to display something huge. What was the alias you were trying to add?

      Steve

      C 1 Reply Last reply Oct 20, 2023, 11:56 AM Reply Quote 0
      • J
        johnpoz LAYER 8 Global Moderator @cdsJerry
        last edited by Oct 20, 2023, 2:50 AM

        @cdsJerry yeah if your going to add large cidr ranges - don't use the host alias, since it will expand them to for every IP in the range. Use the networks alias if your adding large number of large cidr ranges.

        Where are you pulling this list of IP/Networks from exactly - you know updating the alias can be automated either with the built in alias tools or pfblocker alias function is way more robust

        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

        C 1 Reply Last reply Oct 20, 2023, 12:06 PM Reply Quote 0
        • S
          stephenw10 Netgate Administrator
          last edited by Oct 20, 2023, 11:23 AM

          Yup probably that^ 👍

          1 Reply Last reply Reply Quote 0
          • C
            cdsJerry @stephenw10
            last edited by Oct 20, 2023, 11:56 AM

            @stephenw10
            I'm sure it was a huge list but since the gui can't display it now, I can't edit it. How do I get back to a way where I can manage it and maybe do it right this time? (based on the comments below)

            1 Reply Last reply Reply Quote 0
            • S
              stephenw10 Netgate Administrator
              last edited by Oct 20, 2023, 11:58 AM

              Can you view the aliases page at all? If so you can probably delete it.

              Otherwise I would roll back the config to before you added it. Either via Diag > Backup/Restore or at the console if you can't reach that.

              Steve

              C 1 Reply Last reply Oct 20, 2023, 12:25 PM Reply Quote 0
              • C
                cdsJerry @johnpoz
                last edited by Oct 20, 2023, 12:06 PM

                @johnpoz Yes, it was a list published on Cloudflare's page. It's a bunch of large ranges. I saw that the interface would expand out the list but I didn't know that would crash the system. I'm sure this is the problem. I think I had put in two, maybe three, of the ranges before it crashed.

                So how do I get into the alias to manage it at this point? Do I just delete the entire alias and start it over as network instead of a host?

                There had been some IPs in there with a description something like "imported from Cloudlfare/ips" or something. I can't give you the exact text as it's gone and I can't even get into the alias now. But I did notice that none of the IPs listed there were anything even similar to the IP list on Cloudflare's page. I figured the ones in the firewall were outdated. I think they all started with 199. or 197.

                I don't know anything about an automated Alias tool. I wonder if that's where the old list came from but if so, why didn't any of the IPs match the IP list from Cloudflare?

                S J 2 Replies Last reply Oct 20, 2023, 12:16 PM Reply Quote 0
                • S
                  stephenw10 Netgate Administrator @cdsJerry
                  last edited by Oct 20, 2023, 12:16 PM

                  @cdsJerry said in Crashes when try to edit alias:

                  Do I just delete the entire alias and start it over as network instead of a host?

                  Yes, do that if you can.

                  1 Reply Last reply Reply Quote 0
                  • J
                    johnpoz LAYER 8 Global Moderator @cdsJerry
                    last edited by johnpoz Oct 20, 2023, 12:23 PM Oct 20, 2023, 12:18 PM

                    @cdsJerry without info on where you got the list of cloudflare IPs or ranges have no idea why they might be different or even the ability to check Ips listed on who owns them.

                    If I was looking for the authoritative list of what IPs cloudflare uses - I would go to the horses mouth..

                    https://www.cloudflare.com/ips/

                    From that the Ipv4 isn't all that large of list. But if you converted those ranges to individual IPs - it would be a shit ton ;) There are 2 /13s in that list - those alone are over 500k IPs each.

                    173.245.48.0/20
                    103.21.244.0/22
                    103.22.200.0/22
                    103.31.4.0/22
                    141.101.64.0/18
                    108.162.192.0/18
                    190.93.240.0/20
                    188.114.96.0/20
                    197.234.240.0/22
                    198.41.128.0/17
                    162.158.0.0/15
                    104.16.0.0/13
                    104.24.0.0/14
                    172.64.0.0/13
                    131.0.72.0/22
                    

                    Out of curiosity only - why do you want such an alias? How are you going to use it?

                    Just the /13s and the /14 your over 1.3 Million Ips if you expand the cidrs out - that is a lot of entries for a "table" ;)

                    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

                    C 1 Reply Last reply Oct 20, 2023, 12:30 PM Reply Quote 0
                    • C
                      cdsJerry @stephenw10
                      last edited by Oct 20, 2023, 12:25 PM

                      @stephenw10 I I reloaded the config from an auto backup. I can' now get into the alias
                      The entries are of two kinds with several entries of each kind. They look like this:

                      199.27.128.30 Entry added Mon, 24, Oct 2011 12:41:52 +0000 Note this entry was added 13 years ago?
                      197.234.240.0 from cloudflare.com/ips

                      The second one is part of the address listed on Cloudlfare's list of IPs
                      173.245.48.0/20
                      103.21.244.0/22
                      103.22.200.0/22
                      103.31.4.0/22
                      141.101.64.0/18
                      108.162.192.0/18
                      190.93.240.0/20
                      188.114.96.0/20
                      197.234.240.0/22
                      198.41.128.0/17
                      162.158.0.0/15
                      104.16.0.0/13
                      104.24.0.0/14
                      172.64.0.0/13
                      131.0.72.0/22

                      So it appears that I'm back to where I started, which in this case is good. Now I just need to figure out how to update the list correctly.

                      1 Reply Last reply Reply Quote 0
                      • C
                        cdsJerry @johnpoz
                        last edited by Oct 20, 2023, 12:30 PM

                        @johnpoz Sorry for the IP list. Looks like were were both writing at the same time.

                        The reason I was messing with this at all is that I'm getting a pile of 520 errors on my website. When I pause Cloudflare they go away so it appears that for some reason Cloudflare isn't able to access my server to get the images (that's all that's stores on this particular server... images used on my website and a few specification files that can be downloaded). It seemed reasonable to me that if I turned off Cloudflare and could get the images, but turn on Cloudflare and there's a 520 error which it reports as being between Cloudflare and my server... it must be the firewall. So I started looking at the Alias list and sure enough, I had one for Cloudflare but most of it appeared to be out of date so I thought "ah ha! That's why I'm getting 520 errors. I should update the IP lists." And boom! Here I am.

                        J 1 Reply Last reply Oct 20, 2023, 12:39 PM Reply Quote 0
                        • J
                          johnpoz LAYER 8 Global Moderator @cdsJerry
                          last edited by Oct 20, 2023, 12:39 PM

                          @cdsJerry so you using the alias to what IPs can access your resource via firewall. And you want only cloudflare to access these resources. Oh that makes sense, thanks for setting my Kuriosity Kat at ease..

                          if you create a network alias that should be easy enough to create.. But you could prob also just have it loaded directly using the url to the text version of that list..

                          https://www.cloudflare.com/ips-v4/#

                          here you go - the 7 I put there in the drop down means this list would be updated every 7 days.. You could do a 1, if you wanted it to be updated in hours you would need to use the pfblocker aliases features. But doesn't really look like they update that list all that often

                          login-to-view

                          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

                          C 1 Reply Last reply Oct 20, 2023, 12:46 PM Reply Quote 2
                          • C
                            cdsJerry @johnpoz
                            last edited by cdsJerry Oct 20, 2023, 12:49 PM Oct 20, 2023, 12:46 PM

                            @johnpoz John, actually I'm not trying to restrict access to only Cloudflare. I'm just trying to make sure Cloudflare isn't blocked by some other rule so I put the Cloudflare alias above most of the block rules. I say that... but as I go look at my rules list just now I see it's Disabled. Not sure if it's been disabled or if that just happened when I restored the alias from the config backup. Maybe that rule hasn't been active for a long time. I hadn't looked at that before I started making changes to the alias. Rats.

                            I see the rule information says it was last updated on 5/8/15 so I guess this rule hasn't done anything for years. Probably best to just delete it and delete the Cloudflare alias as well.

                            J 1 Reply Last reply Oct 20, 2023, 12:53 PM Reply Quote 0
                            • J
                              johnpoz LAYER 8 Global Moderator @cdsJerry
                              last edited by Oct 20, 2023, 12:53 PM

                              @cdsJerry ok - same difference really.. If you block XYZ via some rule, and you want to make sure these IPs are not blocked.. Then sure you put rule allowing this alias before your block that blocks other stuff.

                              I do same to be honest.. I only allow for example US Ips in some rules. But I also want to make sure that the statuscake Ips - that could be global always have access. So I use a floating rule that allows the list of IPs from statuscake, before it would hit the rule that only allows US ips, etc.

                              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

                              C 1 Reply Last reply Oct 20, 2023, 1:42 PM Reply Quote 0
                              • C
                                cdsJerry @johnpoz
                                last edited by Oct 20, 2023, 1:42 PM

                                @johnpoz OK, I changed the Alias to the table as you suggested above and I enabled the rule again. I don't know where the problem is, but I still have a problem. When I disable the cache on Cloudflare so that all request must pull their images from our server... all the images fail to display. I don't know if it's a firewall problem but it sorta looks like it.

                                J 1 Reply Last reply Oct 20, 2023, 1:55 PM Reply Quote 0
                                • J
                                  johnpoz LAYER 8 Global Moderator @cdsJerry
                                  last edited by johnpoz Oct 20, 2023, 1:56 PM Oct 20, 2023, 1:55 PM

                                  @cdsJerry well if it was a firewall problem - you would see traffic being blocked, unless you disabled the log of deny?

                                  Do you see traffic from an IP that is being denied to what I would assume is 443 on your firewall?

                                  Are you saying if you remove the rule for cloudflare IPs it works?

                                  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

                                  C 1 Reply Last reply Oct 20, 2023, 2:36 PM Reply Quote 0
                                  • C
                                    cdsJerry @johnpoz
                                    last edited by cdsJerry Oct 20, 2023, 2:59 PM Oct 20, 2023, 2:36 PM

                                    @johnpoz I honestly don't know what's going on. Is it a firewall issue or a Volusion issue? Beats me. If it's Volusion I don't want to waste any more of your time.

                                    login-to-view

                                    I have found a pattern, but no explanation. If I open a browser and pull up a product that has no image I can refresh the page multiple times.. .still no image. I then open that product page in Volusion's back end and go to the images section. I copy the image file name (text) and paste it right back into the same field making NO changes, then save the product. And then refresh the page on my computer and the image now displays perfectly.

                                    If I copy the entire URL instead of just the file name sometimes it displays and sometimes it doesn't. But if I copy just the picture name and paste it back, it works.

                                    All this sounds like a Volusion problem.. so why the 520 errors trying to view those images in a browser. That has nothing to do with Volusion as the images aren't hosted on their computers at all. Here's an example I haven't fixed. https://images.cds.com/Microboards/MEDB-10001_sm.jpg

                                    Several min. later I reloaded that URL above without making ANY changes to either the firewall, my server, nor Volusion. And now the picture loads just fine. When I look at the firewall logs MY IP doesn't show up, which makes sense. After all, the IP looking for the image should have been one of those millions of Cloudflare IPs.

                                    J 1 Reply Last reply Oct 20, 2023, 9:54 PM Reply Quote 0
                                    • S
                                      stephenw10 Netgate Administrator
                                      last edited by Oct 20, 2023, 2:42 PM

                                      Some sort of dynamic reference that gets recreated when you save it maybe?

                                      1 Reply Last reply Reply Quote 0
                                      • J
                                        johnpoz LAYER 8 Global Moderator @cdsJerry
                                        last edited by johnpoz Oct 20, 2023, 9:55 PM Oct 20, 2023, 9:54 PM

                                        @cdsJerry Why are those blocked? What rule blocked them? Are they stateful blocks? Or are they something other than a SYN? What is in the protocol column for those blocks?

                                        Maybe the session closed on your end, and when clouldflare tries to use a old session its blocked because its out of state? I you have a specific rule that allows those IP ranges - the only reason they would be blocked is they are to a wrong port, or are out of state.

                                        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

                                        C 1 Reply Last reply Oct 23, 2023, 12:05 PM Reply Quote 0
                                        • C
                                          cdsJerry @johnpoz
                                          last edited by Oct 23, 2023, 12:05 PM

                                          @johnpoz The log has moved past those entries now. I'm 99% sure they were TCP:S I thought I'd captured the block rule but I see the graphic that I didn't get it. It may have been a state because I'm not seeing it blocked this morning. Either that or Cloudflare got the resources from another IP and is caching them now because all my images are on the website. Before they were missing the graphics.

                                          J 1 Reply Last reply Oct 23, 2023, 12:40 PM Reply Quote 0
                                          3 out of 21
                                          • First post
                                            3/21
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.