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
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
FWIW, on my Mac, running macOS Sequoia, the following is the proper syntax for the nc command:
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.
FWIW, on my Mac, running macOS Sequoia, the following is the proper syntax for the nc command:
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.
According to the man page, you have to supply an interface name with the -b flag.
Try en1, en2, etc.
Thank you for the help. I fixed the command, now it is working.
nc -b flag bad interface name