nc -b flag bad interface name

When I try to use netcat (nc) command in terminal with flag -b I receive an error "bad interface name".

nc -w1 -u -b 192.168.1.163 9

Posted on May 15, 2025 8:37 PM

Reply
Question marked as Top-ranking reply

Posted on May 16, 2025 4:40 PM

FWIW, on my Mac, running macOS Sequoia, the following is the proper syntax for the nc command:

  • usage: nc [-46AacCDdEFhklMnOortUuvz] [-K tc] [-b boundif] [-i interval] [-p source_port]


And man nc reveals:

SYNOPSIS

   nc [-46AcDCdhklnrtUuvz] [-b boundif] [-i interval] [-p source_port]

    [-s source_ip_address] [-w timeout] [-X proxy_protocol]

    [-x proxy_address[:port]] [--apple-delegate-pid pid]

    [--apple-delegate-uuid uuid] [--apple-ext-bk-idle]

    [--apple-nowakefromsleep n] [--apple-ecn mode] [hostname] [port[s]]


... and as etresoft has eluded to:

-b boundif

       Specifies the interface to bind the socket to.

4 replies
Question marked as Top-ranking reply

May 16, 2025 4:40 PM in response to egalarza

FWIW, on my Mac, running macOS Sequoia, the following is the proper syntax for the nc command:

  • usage: nc [-46AacCDdEFhklMnOortUuvz] [-K tc] [-b boundif] [-i interval] [-p source_port]


And man nc reveals:

SYNOPSIS

   nc [-46AcDCdhklnrtUuvz] [-b boundif] [-i interval] [-p source_port]

    [-s source_ip_address] [-w timeout] [-X proxy_protocol]

    [-x proxy_address[:port]] [--apple-delegate-pid pid]

    [--apple-delegate-uuid uuid] [--apple-ext-bk-idle]

    [--apple-nowakefromsleep n] [--apple-ecn mode] [hostname] [port[s]]


... and as etresoft has eluded to:

-b boundif

       Specifies the interface to bind the socket to.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

nc -b flag bad interface name

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.