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

    Firewall Rule

    Off-Topic & Non-Support Discussion
    5
    10
    3.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.
    • H
      heirkeyso
      last edited by

      Dear All,

      Please see attached file for our existing firewall rule. Kindly explain to me what happening when this rule is used by pfsense.

      Thank you in advance
      FirewallRule.jpg
      FirewallRule.jpg_thumb

      1 Reply Last reply Reply Quote 0
      • P
        phil.davis
        last edited by

        Any traffic starting from LAN and going to FacebookIP will be blocked. Hover over "FacebookIP" or look in Firewall-Aliases to see what is FacebookIP. It might be a fixed list of IP networks, or a URL to a list of networks that pfSense is loading.
        It will only be useful if the list contains all the IP networks used by Facebook.

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

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

          What should I do if I want to add another alias of IP for twitter or to block the twitter.com? I know I should know the ipaddress of twitter and make an alias of it and make a rule. Where should I put that alias? I want also to have an exemption for a certain LAN ip address to access these social network, how can we set-up on this?

          When I add an firewall should I restart the pfsense?

          Thank you in advance.

          1 Reply Last reply Reply Quote 0
          • DerelictD
            Derelict LAYER 8 Netgate
            last edited by

            @heirkeyso:

            What should I do if I want to add another alias of IP for twitter or to block the twitter.com? I know I should know the ipaddress of twitter and make an alias of it and make a rule. Where should I put that alias?

            First, create a new alias for Twitter IPs.  Firewall->Aliases.  You can use the facebook entry as an example.

            Then, on the firewall rules for LAN, add a new rule based on the Facebook rule (The + on the facebook rule line.)

            Change the facebook alias entry to the new twitter alias.

            The twitter rule should go directly before or after the facebook rule.

            pfSense firewall rules are, in general, evaluated from the first to the last.  As soon as a rule matches the traffic, it's forwarded on its way.

            I want also to have an exemption for a certain LAN ip address to access these social network, how can we set-up on this?

            You would want to create another alias for the allowed IPs.  You would then create a rule just above the twitter/facebook rules that passes traffic with a source of that alias to any.

            When I add an firewall should I restart the pfsense?

            Thank you in advance.

            No.  When you apply the changes to your rule set, all new connections will obey them.  Existing connections will continue to function.  If you want to dump existing connections (firewall states), use Diagnostics->States then reset states on the Reset States tab.

            When you're making all these new aliases and adding the rules, you can wait until you're finished then apply the new rules once.

            Opinion: Manually blocking sites like this is pretty much an exercise in futility.

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

            1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator
              last edited by

              "Opinion: Manually blocking sites like this is pretty much an exercise in futility."

              Agreed – if you need to block sites like this, you should move to content filtering with a proxy like squid where you can block based upon url names and don't have to worry about the 100s if not 1000's of IPs that a site might be using.. Sites like these are served up off major CDNs, the ips are going to be constantly changing..  You also run into the possibility of blocking sites you don't want to block because the IP is shared, etc.

              If you have 1 specific HOST, or even say a netblock you want to block sure -- but when you get to blocking major domains, doing it via firewall rules that look up an IP is not going to be very effective.

              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

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

                How can you block the sites that are using https protocol? Upon reading and searching website that are using https protocol cannot be block by squid guard in transparency mode.

                Do you have any suggestion about this? I'm using the firewall to block the site because of this issue.

                1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator
                  last edited by

                  Then don't use transparency mode.. Duh!! ;)

                  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

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

                    I got your point not to use the transparency mode. But I chose to use that mode because to eliminate the configuration on the workstation and some of our workstation is mobile.

                    1 Reply Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator
                      last edited by

                      So use WPAD and autoconfiguration of the proxy then..  Duhh!!

                      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

                      1 Reply Last reply Reply Quote 0
                      • A
                        agixdota
                        last edited by

                        @johnpoz:

                        So use WPAD and autoconfiguration of the proxy then..  Duhh!!

                        excuse me sir  ;D
                        what is WPAD and i cant find menu on the proxy server?
                        i am so interest on filtered https with non transparency mode with autoconfig any device

                        best regards  :)

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