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

    pfsense firewall rules and frr for bgp

    Scheduled Pinned Locked Moved FRR
    9 Posts 3 Posters 1.0k 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.
    • E
      ericlee
      last edited by

      Successfully setup pfSense in firewall mode with no NAT and FRR for BGP, accepting Full Tables for IPv4 from my single upstream and successfully announcing my single /24.

      How do I setup the firewall rules now?

      If I don't Allow All incoming on the PTP Interface to any any, then no traffic passes through.

      If I allow All Incoming Any Any, my logs show the world scanning every port and every IP on my /24.

      1.png 2.png

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

        @ericlee Why would you take a full table if you only have one upstream? They can just default-originate instead.

        Pass the BGP from the peer and pass the traffic you want to allow in to your /24. If that is zero inbound connections, then you're already done.

        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)

        E 1 Reply Last reply Reply Quote 0
        • E
          ericlee @Derelict
          last edited by

          @Derelict - upstream will only send full tables, that's not my immediate concern, my concern is how do I run firewall rules so I can only allow legit traffic.

          Behind it are a bunch of hosts and other pfsense firewalls with a single WAN from /24 and LAN from rfc1918 blocks doing traditional web/file/print/corp/vpn/etc...

          Again I don't want to disable pf and make it as a plain router, hence my original post.

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

            @ericlee Define legit traffic and make pass rules for that traffic.

            You do not need any rules on WAN except those necessary for the BGP session to come up should your peer connect to you instead of you connecting to them (it could happen either way).

            Everything else inbound should be blocked except those connections you consider to be "legit."

            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)

            E 1 Reply Last reply Reply Quote 0
            • E
              ericlee @Derelict
              last edited by

              @Derelict - Gave up on pfSense for BGP, switching to CHR instead and will continue to use pfSense for firewalling where it shines.

              M 1 Reply Last reply Reply Quote 0
              • M
                michmoor LAYER 8 Rebel Alliance @ericlee
                last edited by

                @ericlee
                so confused from start to finish on this post...

                Firewall: NetGate,Palo Alto-VM,Juniper SRX
                Routing: Juniper, Arista, Cisco
                Switching: Juniper, Arista, Cisco
                Wireless: Unifi, Aruba IAP
                JNCIP,CCNP Enterprise

                E 1 Reply Last reply Reply Quote 0
                • E
                  ericlee @michmoor
                  last edited by

                  @michmoor - Let me summarize...sub-leasing a single cabinet at a datacenter, single 1g upstream, wanted to use pfSense with NAT disabled to announce 2 x /24 using FRR for BGP.

                  If I don't enable certain firewall rules, incoming traffic doesn't pass through. I was able to get it working for 1 day until everything stopped working, after a few days of troubleshooting and working with the upstream, I came to the conclusion I did something wrong.

                  So I tried CHR and that worked and then it stopped working also after a certain time.

                  Anyhow due to lack of time, the upstream is now temporarily announcing the netblocks instead, I was able to replicate data from old datacenter with minimal downtime.

                  Turns out that BGP was working for a bit and then somewhere up the chain, which I don't have visibility on, the packets were being discarded and this came to light only after the upstream tried to announce the networks.

                  When I have time I am going to move one of the /24 back to pfSense and test with FRR.

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    michmoor LAYER 8 Rebel Alliance @ericlee
                    last edited by

                    @ericlee Thank you for additional details. Did you ever disable the firewall on pfsense?

                    Firewall: NetGate,Palo Alto-VM,Juniper SRX
                    Routing: Juniper, Arista, Cisco
                    Switching: Juniper, Arista, Cisco
                    Wireless: Unifi, Aruba IAP
                    JNCIP,CCNP Enterprise

                    E 1 Reply Last reply Reply Quote 0
                    • E
                      ericlee @michmoor
                      last edited by

                      @michmoor - Yes, disabling the firewall didn't solve the issues, but I don't want a router only without any firewalling capabilities exposed to the public internet.

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