Ipfw context error



  • 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?



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


  • LAYER 8 Netgate

    Yeah:

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

    list contexts and assigned interfaces

    ipfw_context -l



  • @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!



  • … 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 ?



  • @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)


  • LAYER 8 Netgate

    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.


Log in to reply