The tag has no usage guidance.

learn more… | top users | synonyms

15
votes
5answers
7k views

Forward local port or socket file to remote socket file

Quick question - I run two linux boxes, one my own desktop and the other my VPS. For security reasons on the VPS end I opted for socket connections to MySQL (/var/run/mysqld/mysql.sock). I know I can ...
14
votes
3answers
9k views

What's the difference between socat and netcat?

I understand that socat is described as a "more advanced" version of netcat, but what is the actual difference? Would it be correct to say that everything you can do in netcat you can also do in ...
6
votes
1answer
7k views

Forwarding linux terminal from serial port to TCP with socat

I'm working on embedded ARM platform, Slackware. I'm using G24 Java modem which is configured to forward data between ports /dev/ttyS1 and /dev/ttyACM0, so anything that goes onto any of these ports ...
5
votes
5answers
15k views

echo server with netcat or socat

I want a UDP echo server to get packets, and reply exactly what it has received. How can I simply do this using netcat or socat? It should stay alive forever and handle packets coming from several ...
5
votes
2answers
2k views

Access D-Bus remotely using socat

Description: I'd like to access a D-Bus system service from another machine, knowing only machine's IP address and the service to connect to. What I have recently found is Gabriel (D-Bus over SSH). ...
5
votes
1answer
2k views

Socat to share a serial link between multiple processes

I have a scenario where multiple processes on the same box want to communicate with a serial device. Process A needs two-way communications with the serial port, and Process B only needs to be able ...
4
votes
1answer
2k views

socat: Show incoming connections

I am slightly going mad. Even if I call socat like this: socat -vvvv tcp4-listen:9000 tcp4-listen:9001 it works perfectly, but doesn't inform me about incoming TCP connections! Is there an ...
4
votes
2answers
2k views

Forwarding serial port over network and back to serial char device on remote host (socat?)

I'm working with a linux application which needs to talk with a remotely-located serial (rs-232) device. I've worked out how to use socat on the remote end to send the device's serial data over an IP ...
4
votes
0answers
754 views

Can socat be used to forward an ssh-agent socket into a chroot?

I'm building custom Debian environments on a remote server, which I connect to over SSH. This involves building a debootstrap environment, then chrooting into it to run a custom installer. As part of ...
3
votes
1answer
9k views

How do i use socat as a proxy server?

I'd like my .NET app to use a proxy which i know how to do except .net doesnt support sock4a/sock5. I know how to setup my app but How do i setup socat to at as a TCP proxy on part 1234 and use the ...
3
votes
1answer
515 views

socat TCP file server

I'm trying to set up a simple socat fileserver using TCP to send small files (~100KB). Here are the one-line servers and client for one file: Server: socat -u -d -d OPEN:file.dat TCP-LISTEN:<port&...
2
votes
2answers
2k views

socat connect-connect “proxy” two inbound TCP connections to expose a firewalled service?

I'm struggling a bit trying to see how to use socat (or a similar TCP port redirector) to expose a firewalled service on a PC. Here's the scenario: I have a server PC which will be acting as a ...
2
votes
1answer
641 views

Simulate tcp disconnect using socat

I am trying to use socat command to simulate a tcp disconnect between my client service and EMS broker process on a remote host. I am running this socat command socat TCP-LISTEN:8123,fork TCP:...
2
votes
2answers
8k views

Windows/Linux socat to share a serial device over IP

I have a scenario where I demonstrated to my group @ work how to share a very expensive USB patient simulator plugged into a Raspberry Pi (Debian) using socat. The group wants to be able to have an on-...
2
votes
0answers
180 views

use socat to provide password to bsign

I have many servers, where I deploy various binaries. For this purpose I use a script that packs them into archives, publishes to the local repository and then ssh-es to the target servers and ...
2
votes
2answers
229 views

Resolving HAProxy BADREQs using socat

I'm trying to figure out why i'm getting BADREQs from time to time, by using "show errors" in socat. The problem is that it only shows the last error. I want to be able to see all of them ( like using ...
1
vote
1answer
806 views

socat udp packet forwarding with source address

I am trying to use socat (instead of iptables) for UDP port forwarding. I just need to redirect some traffic from UDP port 162 to 33162. I am using something like this: socat udp-listen:162,pktinfo,...
1
vote
1answer
151 views

Why Socat is sending back the input to client?

I am using this command socat -lm -d -d TCP4-LISTEN:5555,reuseaddr,fork EXEC:/bin/myscript,chroot=/root/,su=root,pty,stderr to start a server but when i send the i connect to it through netcat and ...
1
vote
1answer
1k views

Need help in Haproxy socat for cacti

am using the haproxy socat to get the sessions data to plot it in cacti, /var/run/socket-haproxy is owned by www-data (the user which cacti uses) but when I try to execute this command as www-data am ...
1
vote
1answer
3k views

Is it possible to make a web browser proxy tunnel with Netcat/Socat?

Concerning the Netcat/Socat utility . From the man page, it seems like it is possible to create a secure proxy using netcat by which I could point my web browser to like a proxy server , that could ...
1
vote
1answer
40 views

UDP multicast send/receive: Routing or socat issues?

I'm using 'socat' on Linux Centos 7 to diagnose some problems. Server and clients are all linux centos7, they all have multiple interfaces. Server 10.1.1.1 is on Switch 1, 10.1.1.2 is on Switch 2. ...
1
vote
0answers
617 views

Always keep socat alive

I have a socat running nicely, executing my command when a connection comes in with the arguments provided. However, the issue I am having is that the socket is at EOF and the next time a connection ...
0
votes
2answers
87 views

Dumping the contents of HTTP packets between two VPNs

Here's my setup: Client ---> VPN 1 (my pc, same subnet of the client) --> VPN 2 (external VPN) --> Internet Both VPNs are L2TP/IPSec and the first one is an Ubuntu server with Openswan. I need ...
0
votes
2answers
560 views

Redirect to port based on requested (sub)domain (1 IP, non-HTTP request) [duplicate]

Possible Duplicate: How to use DNS to redirect domain to specific port on my server So I've been trying to figure out how to redirect a subdomain to a specific port. Let's assume the ...
0
votes
1answer
569 views

Using socat to exec php cli

There are multiple client programs that periodically connect to a port on my server and send a single line of text. When a connection to the port is made I need to start a PHP CLI script that ...
0
votes
0answers
15 views

SOCAT to serial port with more than one client

Try to connect by socat by 2 clients to one serial connection, when connecting the second one I get a permission denied error message I tried: socat TCP-LISTEN:5432,fork, reuseadder /dev/ttyS2,raw,...
0
votes
0answers
70 views

multiplexing a TCP connection through a dumb shell connection?

I am connecting to a VPN whose gateway is sufficiently misconfigured that basically the only useful thing I can do with it is to ssh to a specific Linux host set up for my usage inside the VPN, and ...
0
votes
1answer
44 views

socat CREATE returning Bad file descriptor

I'm trying to build a quick script which listens for one UDP packet, stores it to a file, and exits. socat to the rescue! $ socat UDP-RECVFROM:9999 CREATE:/tmp/results_9999 2016/04/08 11:56:59 socat[...
0
votes
0answers
27 views

Bind the ip adresses with the hosts using socat command

I have squid proxy installed in my server, and I want to bind the ip adresses with the hosts I want to connect to them. How can I do it with socat command? Example : prox_IP : 1.1.1.1 proxy_port : ...
0
votes
0answers
68 views

Can't write to a virtual com port on ubuntu

I'm running an ubuntu VM on hyper v and I need the ubuntu install to be able to access a local com port on my VM host. Unfortunately this isn't possible with hyper-v. So using Com by TCP I'm ...
0
votes
0answers
59 views

socat Resource temporarily unavailable

I am using socat as a bridge between some devices and running socat (a couple hundreds of instances) like this: socat -d -d -d -x -d -lf "/var/log/some_log_file" TCP4-LISTEN:6126,fork,max-children=1,...
0
votes
0answers
57 views

How to forward a pair of UNIX domain SOCK_DGRAM sockets to remote host?

I have two processes communicating with each other with two unix domain datagram sockets. I need to run these processes on separate hosts (on the same LAN). I'm trying the following socat UDP-LISTEN:...
0
votes
0answers
92 views

UDP Port Forwarding Error: channel 2: open failed: connect failed: Connection refused

My situation is as follows: I have currently trying to have a program between two Hosts send UDP packets over a SSH Tunnel. There is also a host intermediate between the two hosts. Note Server01 ...
0
votes
0answers
36 views

How can I make sure my virtual serial ports are available at bootup

I am using a Serial port re-directer and Clone functionality done through a python script. With Virtual Serial ports that are created via socat. How do ensure that these Virtual Serial ports will be ...
0
votes
0answers
71 views

zabbix_agent + socat hanging with close_wait

I have the following setup: remote devices running active zabbix_agentd (version 2.0) using socat to tunnel through an HTTPS proxy. On the server side: Apache with a proxy service allowing CONNECT to ...
0
votes
0answers
86 views

Forward all connection to specific remote port to different host

I have the following setup: Local machine connected to intranet Proxy server connected to both intranet and internet through different interfaces Remote server I am forced to use an application on ...
0
votes
1answer
156 views

with socat, given port on the remote (server) host is to be forwarded to the given host and port on the local side

Is it possible to use socat to achieve the following, without the need of using ssh? > ssh -N -R 8080:localhost:1080 mylogin@server.com -R [bind_address:]port:host:hostport Specifies that the ...
0
votes
1answer
1k views

Forwarding SNMP ports over SSH

I access my work network through a VPN and have access to every host in there through SSH. Currently I need to access around 3000 hosts via SNMP, but corporate sec policies restrict SNMP access ...