Netcatがどのアドレスでもリッスンしている理由を理解しようとしています。これが私が与えるコマンドと私が得る応答です
# nc -l -p 9500 -vvu 172.24.176.221 9500
Warning: Inverse name lookup failed for `172.24.176.221'
Listening on any address 9500
注意すべきいくつかの事柄:
nc --version
の出力です。
netcat (The GNU Netcat) 0.7.1
Copyright (C) 2002 - 2003 Giovanni Giacobbi
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program under the terms of
the GNU General Public License.
For more information about these matters, see the file named COPYING.
Original idea and design by Avian Research <[email protected]>,
Written by Giovanni Giacobbi <[email protected]>.
uname -a
の出力です。
Linux bpu-modem-21 4.14.0-xilinx-v2018.2 #1 SMP PREEMPT Thu Nov 8 15:48:00 PST 2018 armv7l armv7l armv7l GNU/Linux
4.これが私のcat /proc/sys/kernel/osrelease
、4.14.0-xilinx-v2018.2
の出力です
問題は、netcatに特定のアドレスをリッスンさせるにはどうすればよいですか?
男netcat:
-s ADDRESS --source=ADDRESS Specifies the source address used for creating sockets. In listen mode and tunnel mode this switch specifies the bound address, and it is generally a good idea not to specify this, which causes net‐ cat to bind to a generic interface. In the connect mode, this switch is used to specify the source address for connecting to the outside world. Again, if it's not specified a proper address for the destination route will be used.