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

    IP-Blocklist

    Scheduled Pinned Locked Moved pfSense Packages
    496 Posts 86 Posters 512.4k 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.
    • J
      jigpe
      last edited by

      Good morning

      I just want to block the ip of at least 4 websites ip.. How to do that? What if they will use https?

      jigp
      1.2.2 pfsense

      1 Reply Last reply Reply Quote 0
      • T
        tommyboy180
        last edited by

        @jigpe:

        Good morning

        I just want to block the ip of at least 4 websites ip.. How to do that? What if they will use https?

        jigp
        1.2.2 pfsense

        You will need to create a small list

        Website1:192.168.1.100-192.168.1.100
        website2:192.168.1.101-192.168.1.101
        website3:192.168.1.102-192.168.1.102
        website4:192.168.1.103-192.168.1.103
        

        That list will work perfect. Now just upload the list to a site where you can download and add to the package.

        -Tom Schaefer
        SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM

        Please support pfBlocker | File Browser | Strikeback

        1 Reply Last reply Reply Quote 0
        • H
          Hugovsky
          last edited by

          Anothe thing: I use my pfsense box to establish adsl connection with isp. Whenever it reconnects, ip-blocklist is disabled because pfsense reloads stuff. Can this be corrected?

          1 Reply Last reply Reply Quote 0
          • J
            jigpe
            last edited by

            thanks for the reply, but its about exceptions tom..i have two users.user1 is allowed to access https site2 and https site1 but is not allowed to access https site3..user2 is not allowed to access https site2 and https site3 but allowed to access https site1..i can block http sites but i cannot block https :(..i need to open 443 because i use gmail and other email that uses 443..the sites that im going to block is facebook.com, youtube.com,friendster.com and multiply.com. i already block http using squid..but user will use https, i cannot block https :( please share your knowledge…thanks

            jigp
            1.2.2

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

              Here's a question.  I have taken this as straight forward but apparently I'm doing something wrong.  I installed the package, added the URLs (with .gz), rebooted, and then "Save/Update" however the status continues to say "NOT running" and even after rebooting.

              I did find a post mentiong a possible uninstall/reboot/reinstall/reboot/add .gz URLs/reboot/enable would work but alas it has not.  Please verify what I may be doing wrong.  Thank you.

              1 Reply Last reply Reply Quote 0
              • S
                Supermule Banned
                last edited by

                Use Firefox as a browser….. I did an it worked...

                @mgc6288:

                Here's a question.  I have taken this as straight forward but apparently I'm doing something wrong.  I installed the package, added the URLs (with .gz), rebooted, and then "Save/Update" however the status continues to say "NOT running" and even after rebooting.

                I did find a post mentiong a possible uninstall/reboot/reinstall/reboot/add .gz URLs/reboot/enable would work but alas it has not.  Please verify what I may be doing wrong.  Thank you.

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

                  @Supermule:

                  Use Firefox as a browser….. I did an it worked...

                  Hey good idea lol…I normally use Opera and when things don't work I try out IE which seems to be the "overall default" of web designers.  Here is what I receive when I used Firefox:

                  (after a minute and by itself)
                  Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 81 bytes) in /etc/inc/util.inc on line 380

                  (right below "Current Status = NOT running")
                  /tmp/rules.debug:90: syntax error

                  I did upgrade my system from 256MB to 768MB even though the above bytes considered 128MB...some allocation somewhere that needs to be set?

                  1 Reply Last reply Reply Quote 0
                  • T
                    tommyboy180
                    last edited by

                    @mgc6288:

                    @Supermule:

                    Use Firefox as a browser….. I did an it worked...

                    Hey good idea lol…I normally use Opera and when things don't work I try out IE which seems to be the "overall default" of web designers.  Here is what I receive when I used Firefox:

                    (after a minute and by itself)
                    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 81 bytes) in /etc/inc/util.inc on line 380

                    (right below "Current Status = NOT running")
                    /tmp/rules.debug:90: syntax error

                    I did upgrade my system from 256MB to 768MB even though the above bytes considered 128MB...some allocation somewhere that needs to be set?

                    The Allowed memory error is the webserver hitting a limit set in php.ini. You can increase this limit if you like, however the package will still work properly just let it finish before you refresh the page. In FF you can still see the loading animation in the tab even with that error, wait for that to finish.

                    Take a look at Cino's post on page 2 http://forum.pfsense.org/index.php/topic,24769.msg130002.html#msg130002

                    EDIT: You only get this error when you use large lists or a huge collection of lists.

                    -Tom Schaefer
                    SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM

                    Please support pfBlocker | File Browser | Strikeback

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

                      @tommyboy180:

                      The Allowed memory error is the webserver hitting a limit set in php.ini. You can increase this limit if you like, however the package will still work properly just let it finish before you refresh the page. In FF you can still see the loading animation in the tab even with that error, wait for that to finish.

                      Take a look at Cino's post on page 2 http://forum.pfsense.org/index.php/topic,24769.msg130002.html#msg130002

                      EDIT: You only get this error when you use large lists or a huge collection of lists.

                      Gee good point - and the same list.  It does say "Fatal error…" and no other text but I'll let it sit for a while and see what happens.  How would I go about editing php.ini manually and is it line 380?  With 768M of RAM would it be wise to set it to 256M (268435456 bytes)?

                      1 Reply Last reply Reply Quote 0
                      • T
                        tommyboy180
                        last edited by

                        Edit the memory_limit cvar to 256
                        ie. memory_limit = 256

                        -Tom Schaefer
                        SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM

                        Please support pfBlocker | File Browser | Strikeback

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

                          @tommyboy180:

                          Edit the memory_limit cvar to 256
                          ie. memory_limit = 256

                          Where would I go to change that though?

                          1 Reply Last reply Reply Quote 0
                          • T
                            tommyboy180
                            last edited by

                            @mgc6288:

                            @tommyboy180:

                            Edit the memory_limit cvar to 256
                            ie. memory_limit = 256

                            Where would I go to change that though?

                            There are two php.ini files and I forget which one you need to edit.

                            /usr/local/lib/php.ini
                            /usr/local/etc/php.ini

                            I would just add or edit to "memory_limit = 128M" I woudn't do more than 128M because that's all you should need.

                            Just edit one and reboot. See if that works.

                            -Tom Schaefer
                            SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM

                            Please support pfBlocker | File Browser | Strikeback

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

                              @tommyboy180:

                              There are two php.ini files and I forget which one you need to edit.

                              /usr/local/lib/php.ini
                              /usr/local/etc/php.ini

                              I would just add or edit to "memory_limit = 128M" I woudn't do more than 128M because that's all you should need.

                              Just edit one and reboot. See if that works.

                              Well I did find the /usr/local/lib/php.ini and did not find a /usr/local/lib/etc/php.ini (for those with the same problem).  I went to Diagnostics –> Edit File and loaded the former and found the memory_limit = 32M and changed it to 128M.  Then I rebooted and the php.ini file reset back to 32M.  I tried to enable IP Blocklist and received this error:

                              Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 81 bytes) in /etc/inc/util.inc on line 380

                              with this under "Current Status = NOT running" : /tmp/rules.debug:112: syntax error

                              Hmm... ideas?

                              1 Reply Last reply Reply Quote 0
                              • T
                                tommyboy180
                                last edited by

                                It is probablly set in a config file like /etc/inc/config.inc

                                I can't seem to increase the memory size, it stays at 12M no matter what I change.

                                /etc/inc/config.inc even says:

                                /* Set memory limit to 32MB, this is required for large configurations
                                 * A XML config of about 500KB will trigger the default of 12MB
                                 * Setting the memory_limit parameter in the php.ini does not seem to
                                 * take any effect. Also, that would be too late in the boot process
                                 */
                                ini_set("memory_limit","128M");
                                
                                

                                So I'm not sure. Open a new topic and ask the question.

                                -Tom Schaefer
                                SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM

                                Please support pfBlocker | File Browser | Strikeback

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

                                  Well I believe I found my problem.  I opened /tmp/rules.debug and scrolled to the line:

                                  havp proxy ifaces redirect

                                  #rdr on proto tcp from any to () port 8080 -> lo0 port 8080

                                  and put a "#" in front of the offending line rdr…  I don't know what exactly this line is for but I did uninstall the HAVP.  It wasn't running yet but I was wanting to test it out for AV purposes down the road.  It left the above code behind so I commented it out.  I did get this error code the next time I attempted to save/update:

                                  Warning: file_get_contents(wlists.txt): failed to open stream: No such file or directory in /usr/local/www/packages/ipblocklist/ipblocklist.php on line 30 Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 12 bytes) in /etc/inc/util.inc on line 380

                                  Good news is though it says it is "running" which how could I confirm?  Or is this just one of those blind faith things...

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

                                    Great job.

                                    Im uninstalling squid + squidguard and switching to this.

                                    I was previously using squidguard as an url blocker and squid as a 0mb cache proxy.

                                    1 Reply Last reply Reply Quote 0
                                    • T
                                      tommyboy180
                                      last edited by

                                      For the paranoid you can double confirm that the package is running by executing this in a shell:

                                      To confirm the table is being used to block

                                      pfctl -s rules | grep ipblocklist
                                      

                                      This is what the GUI page does to ensure it is running.

                                      -Tom Schaefer
                                      SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM

                                      Please support pfBlocker | File Browser | Strikeback

                                      1 Reply Last reply Reply Quote 0
                                      • D
                                        darklogic
                                        last edited by

                                        How would you add URL's or where can you access .gz extension packages from countryipblock.net?

                                        I see they have URL's that go directly and open up IP list, but they all appear to be in either .txt or .html format.

                                        Thanks for any info on this.

                                        Matt

                                        1 Reply Last reply Reply Quote 0
                                        • T
                                          tommyboy180
                                          last edited by

                                          If you want to block countries then use the Country Block package.

                                          -Tom Schaefer
                                          SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM

                                          Please support pfBlocker | File Browser | Strikeback

                                          1 Reply Last reply Reply Quote 0
                                          • ?
                                            Guest
                                            last edited by

                                            @Hugovsky:

                                            Anothe thing: I use my pfsense box to establish adsl connection with isp. Whenever it reconnects, ip-blocklist is disabled because pfsense reloads stuff. Can this be corrected?

                                            Same thing over here… I use Squid as transparent proxy and establish my adsl connection via PPPoE.

                                            -Frozen

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