Get the App
SLTechnology News&Howtos  ›  Servers  › 

Use the nc command of linux to set up routing

Shulou Source: shulou.com Published: 2022-06-02 16:15:28 10月03日 Update

This article mainly introduces the use of linux nc command to set up routing, the article is very detailed, has a certain reference value, interested friends must read it!

The nc command is a packaged network utility that reads and writes data on the network through the command line; nc, written for the NMAP project, is the pinnacle of the currently divided netcat family, and is designed as a reliable back-end tool that immediately provides network-connected applications and users to other users. Nc can not only use IPv4 and IPv6, but also provide unlimited potential use for users.

Among the many features of nc, the ability to link nc together; TCP, UDP, and SCTP ports to other sites; support for SSL; to authenticate proxy connections through socks4 or HTTP agents (with optional agents); and some general principles apply to most applications, so you can immediately add network support to software that does not normally support it.

Syntax format: nc [parameters]

Common parameters:

-l uses snooping mode to control incoming data-p sets the communication port used by the local host-s sets the IP address of the local host outgoing packet-u uses the UDP transport protocol-v displays instruction execution-w sets the time to wait for connection-z uses 0 input / output mode, only when scanning the communication port

Reference example

Scan port 80:

[root@linuxcool] # nc-nvv 192.168.3.1 80

Scan the UDP port:

[root@linuxcool] # nc-u-z-w2 192.168.0.1 1-1000

Scan the TCP port:

[root@linuxcool] # nc-v-z-w2 192.168.0.3 1-100 and above are all the contents of setting routes using linux's nc command. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Port command network user program agent support routing host content function parameter application data pattern reference application communication utility value Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Microsoft Apple Shulou Information Docker