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

    How to limit bandwidth for social media

    Scheduled Pinned Locked Moved General pfSense Questions
    25 Posts 7 Posters 1.9k 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.
    • K
      Kirby30
      last edited by

      Yes agreed,it deals with AS

      1 Reply Last reply Reply Quote 0
      • A
        atul.chauhan @Gertjan
        last edited by

        @Gertjan understood mean i understand your point related to DNS, can you guide me how can i use AS in firewall rules

        1 Reply Last reply Reply Quote 0
        • GertjanG
          Gertjan
          last edited by Gertjan

          @atul-chauhan I never needed to block some one from visiting some site.
          So, what I know is what I read in on this forum, experiences from other users.

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            pfBlocker can deal with AS numbers and create aliases from the lists of IPs. Then you can use those alises in firewall rules.

            pfBlocker will handle updating the alises periodically. For example:

            Selection_667.png

            Steve

            A N 2 Replies Last reply Reply Quote 1
            • A
              atul.chauhan @stephenw10
              last edited by atul.chauhan

              @stephenw10 Thanks for reply, I have created Alias in pfBlocker IPv4 and added it in firewall, it fetch the list of IPs but not forwarding traffic from defined gateway. Hence if i trace host i can see ip in pfBlocker alias list

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                Um... not sure I understand. What are you trying to achieve? Sending traffic through a Limiter?

                Can we see screenshots?

                Steve

                A 1 Reply Last reply Reply Quote 0
                • A
                  atul.chauhan @stephenw10
                  last edited by

                  @stephenw10 I have created alias in IPv4 and created firewall rule for alias and sending traffic through specific gateway. But is not working hence alias fetch list ips and those are fine.
                  5ddcbebb-f20d-40d5-b0a4-522ab84b5e70-image.png

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    How are you testing? Are the states not going through that using IPs that appear in the Alias?

                    If not then the ASNs don't contain them so you will need to add more.

                    Steve

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      atul.chauhan @stephenw10
                      last edited by

                      @stephenw10 To test gateway i am doing tracert for domain and ips. I can see ips listed in alias list but some time request route from different gateway

                      1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        If the IPs you're testing to are in the list then they should always go via the specified gateway as long as some other pass rule isn't catching them first.
                        The only time that might not happen is if a firewall already exists via another gateway. If you tested then added the firewall rule then immediately tested again without clearing the states for example.

                        Steve

                        A 1 Reply Last reply Reply Quote 0
                        • A
                          atul.chauhan @stephenw10
                          last edited by atul.chauhan

                          @stephenw10 Below image of my firewall configuration, Please help me find out if i did anything wrong.72f22e86-9f10-44b2-8c51-538d4fd4fa9c-image.png

                          J 1 Reply Last reply Reply Quote 0
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            Ah, your rule is TCP only so traceroute won't be caught by it. Set it to any ipv4 protocol.

                            Steve

                            A 1 Reply Last reply Reply Quote 0
                            • J
                              jdeloach @atul.chauhan
                              last edited by

                              This post is deleted!
                              1 Reply Last reply Reply Quote 0
                              • A
                                atul.chauhan @stephenw10
                                last edited by

                                @stephenw10 Thanks that works, this is such a big help. this is what i am trying to achieve from few days. Thanks a lot Stephenw

                                1 Reply Last reply Reply Quote 0
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  No worries. 😉

                                  1 Reply Last reply Reply Quote 1
                                  • S
                                    smmpanelindonesia58
                                    last edited by

                                    This post is deleted!
                                    1 Reply Last reply Reply Quote 0
                                    • N
                                      nimrod @stephenw10
                                      last edited by nimrod

                                      @stephenw10 said in How to limit bandwidth for social media:

                                      pfBlocker can deal with AS numbers and create aliases from the lists of IPs. Then you can use those alises in firewall rules.

                                      pfBlocker will handle updating the alises periodically. For example:

                                      Selection_667.png

                                      Steve

                                      Hey Steve. Quick question while we are on topic. I see on the screenshot that you have update frequency set on weekly. Since there are no links in IPv4 fields, does that mean "an update" will refresh ASN data and update the IP`s in the alias ?

                                      Thanks again for sharing this because, so far this is how i did it.

                                      I execute this into terminal

                                      whois -h whois.radb.net -- '-i origin AS15169' | awk '/^route:/ {print $2;}' | sort | uniq
                                      

                                      And then copy output into the TXT file and then use alias import function to create an alias that i use in firewall rule.

                                      Its a hassle. I know.

                                      1 Reply Last reply Reply Quote 0
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        Yes it updates them. You can check the pfBlocker logs:

                                        
                                        ===[  IPv4 Process  ]=================================================
                                        
                                        [ Spamhaus_drop_v4 ]		 static hold.
                                        [ Google_v4 ]			 Downloading update .
                                          Downloading ASN: 15169... completed
                                        . completed ..
                                        
                                        [ Facebook_v4 ]			 Downloading update [ 04/15/24 00:00:37 ] .
                                          Downloading ASN: 32934... completed
                                        . completed ..
                                        
                                        [ Netflix_v4 ]			 Downloading update [ 04/15/24 00:00:39 ] .
                                          Downloading ASN: 2906... completed
                                        . completed ..
                                        
                                        [ Test_Range_custom_v4 ]	 exists. [ 04/15/24 00:00:40 ]
                                        [ o365_alias_v4 ]		 exists.
                                        
                                        N 1 Reply Last reply Reply Quote 1
                                        • N
                                          nimrod @stephenw10
                                          last edited by

                                          @stephenw10 said in How to limit bandwidth for social media:

                                          Yes it updates them. You can check the pfBlocker logs:

                                          
                                          ===[  IPv4 Process  ]=================================================
                                          
                                          [ Spamhaus_drop_v4 ]		 static hold.
                                          [ Google_v4 ]			 Downloading update .
                                            Downloading ASN: 15169... completed
                                          . completed ..
                                          
                                          [ Facebook_v4 ]			 Downloading update [ 04/15/24 00:00:37 ] .
                                            Downloading ASN: 32934... completed
                                          . completed ..
                                          
                                          [ Netflix_v4 ]			 Downloading update [ 04/15/24 00:00:39 ] .
                                            Downloading ASN: 2906... completed
                                          . completed ..
                                          
                                          [ Test_Range_custom_v4 ]	 exists. [ 04/15/24 00:00:40 ]
                                          [ o365_alias_v4 ]		 exists.
                                          

                                          Awesome. Thank you very much sir !!!!

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