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

    Ipfw context error

    Scheduled Pinned Locked Moved 2.1 Snapshot Feedback and Problems - RETIRED
    7 Posts 3 Posters 7.2k 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.
    • R
      rjcrowder
      last edited by

      Running 2.1 RC1 from a couple of days ago. I can't seem to figure out how to get the ipfw command to work. Anything I try other than "-h" gives me a context error. For example:

      ipfw show
      ipfw: Context is mandatory: No such file or directory
      

      I've checked that ipfw_context exists in /usr/local/sbin

      Any ideas?

      1 Reply Last reply Reply Quote 0
      • R
        rjcrowder
        last edited by

        Figured it out… gotta use the -x option with the CP instance name.

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

          Yeah:

          ipfw -x context list
          ipfw -x context table n list

          list contexts and assigned interfaces

          ipfw_context -l

          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
          • R
            rjcrowder
            last edited by

            @Derelict:

            Yeah:

            ipfw -x context list
            ipfw -x context table n list

            list contexts and assigned interfaces

            ipfw_context -l

            Thanks… didn't know how to list the contexts and assigned interfaces!

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

              … reviving this dead thread ...

              Rather than explain, I will just paste my shell history:

              ipfw show

              ipfw: Context is mandatory: No such file or directory

              ipfw -x context list

              ipfw: getsockopt(IP_FW_GET): Protocol not available

              ipfw_context -l

              Error is: Unknown error: -1#

              .... I am running 2.1.

              Basically I just want to see my firewall ruleset from the command line.  What am I doing wrong here ?

              1 Reply Last reply Reply Quote 0
              • R
                rjcrowder
                last edited by

                @apfusertoo:

                … reviving this dead thread ...

                Rather than explain, I will just paste my shell history:

                ipfw show

                ipfw: Context is mandatory: No such file or directory

                ipfw -x context list

                ipfw: getsockopt(IP_FW_GET): Protocol not available

                ipfw_context -l

                Error is: Unknown error: -1#

                .... I am running 2.1.

                Basically I just want to see my firewall ruleset from the command line.  What am I doing wrong here ?

                Have you started the captive portal? IPFW is only used if you are running the captive portal… The normal firewall uses pf (i.e. use pfctl to see the "pf" rules)

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

                  ipfw_context -l    (That's -(ell) not -(one))

                  and -x "context" needs to be replaced with the captive portal instance name - aka the zone name.

                  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
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.