

This example listens on port 81, accepts connections, and forwards the connections to port 80 on the remote host. Use socat as a TCP port forwarder:įor a single connection, enter: # socat TCP4-LISTEN:81 TCP4:192.168.1.10:80įor multiple connections, use the fork option as used in the examples below: # socat TCP4-LISTEN:81,fork,reuseaddr TCP4:TCP4:192.168.1.10:80 Connect to TCP port 80 on the local or remote system: # socat - TCP4:In this case, socat transfers data between STDIO (-) and a TCP4 connection to port 80 on a host named 2. Let's get started with some basic examples of using socat for various connections.ġ. The syntax for these addresses is: protocol:ip:port Examples of using socat

You must provide the source and destination addresses for it to work. The syntax for socat is fairly simple: socat

Establish a relatively secure environment ( su and chroot) for running client or server shell scripts with network connections.
#Serial port redirector freeware serial
Logically connect serial lines on different computers.Redirect TCP-oriented programs to a serial line.Tool to attack weak firewalls (security and audit).TCP port forwarder (one-shot or daemon).There are many ways to use socate effectively. They do similar things, but socat has more additional functionality, such as permitting multiple clients to listen on a port, or reusing connections. This tool is regarded as the advanced version of netcat. Sockets (UNIX, IP4, IP6 - raw, UDP, TCP).Devices (serial line, pseudo-terminal, etc).There are many different types of channels socat can connect, including: How well do you know Linux? Take a quiz and get a badge.Linux system administration skills assessment.A guide to installing applications on Linux.Download RHEL 9 at no charge through the Red Hat Developer program.
