Questions tagged [socat]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

Using socat for SOCKET-SENDTO

I'm trying to use socat to send a raw packet to an ethernet interface, but I get "No such device or address". How should I be using socat? Usage: $ echo hi | sudo socat - SOCKET-SENDTO:17:3:0:...
0
votes
0answers
27 views

socat recipe for port forwarding TCP traffic between Linux namespaces

Newbie to socat and hence the query. Have access to an Admin process (with root permissions), say 'config'. Device has two Linux namespaces (say, 'outside', 'inside'). 'inside' namespace has a ...
0
votes
1answer
94 views

SSH Tunnel + Socat UDP + Unicast + Multicast

I am trying to communicate from a machine LOCAL (sitting at home) with a scientific instrument (SCIENTIFIC, IP=192.168.1.109) which sits in a remote network along with a raspberry (SERVER). SCIENTIFIC ...
0
votes
1answer
133 views

Share ssh-agent socket or any other named pipe between windows 10 and cygwin

Cygwin emulates sockets by opening port and adding the port number and a "login" secret to a file instead of using windows named pipes. Further there seems to be no access to Windows named pipes from ...
0
votes
0answers
25 views

How to resume a file transfer using netcat or socat or curl?

I have to transfer a 400Gb database consisting of a single file over the Internet from a server where I have full control to an other computer at the opposite border of the ocean (but which uses a ...
1
vote
1answer
618 views

SOCAT IPv4 to IPv6 Routing

i got a small issue/question by using SOCAT on my vServer. My Problem is that i just got CG-NAT DS-Lite ISP wich provides me a private IPv4 Internal ISP IP and an native public IPv6 Adress. That means ...
0
votes
2answers
395 views

Send UDP packet and listen for replies

I have a program with a Send an UDP packet to port xyz and I will reply with some UDP packets! interface. I've found out that I can send a UDP packet with echo <packetContent> | socat - udp:&...
1
vote
1answer
96 views

socat does not terminate the udp client when server side exit

server side: socat udp-l:2023,reuseaddr,fork exec:/bin/bash,pty,setsid,setpgid,stderr,ctty client side: socat -,raw,echo=0 udp:localhost:2023 When I exit the bash, the server side exit, but the ...
3
votes
1answer
254 views

How do I run a command for each UDP packet with socat?

I'm trying to print each arriving UDP packet. I'd like to use xxd to print the ascii contents as well as the raw data (as hex). So far I've used socat - udp4-listen:11255,reuseaddr,fork | xxd This ...
0
votes
1answer
253 views

Using socat to access API behind proxy with client certificate

Is it possible, to use socat to access an API via an external proxy, where the API needs client authentication? Currently I only found out, how to access any website via proxy: TCP4-LISTEN:8443,...
0
votes
1answer
414 views

socat UDP IPv6 to IPv4 gateway results in lots of processes

I have an IPv4-only UDP application listening on port 624. I created an IPv6/IPv4 front-end with socat, listening on port 625. I can now use the server's IPv4 or IPv6 address to access the IPv4-only ...
0
votes
1answer
610 views

socat gives “Resource temporarily unavailable” on OS X High Sierra

I am trying to create a virtual local com-port that forwards everything to a remote computer via TCP with this command: sudo socat GOPEN:/dev/ptyp0,ignoreeof TCP:192.168.254.106:8080 2018/09/08 21:48:...
0
votes
1answer
25 views

Redirect only specific hosts requests, leaving a default for others

I have a machine with only port 80 open, there is already an http server on. I want to intercept any incoming traffic on port 80 and: if coming from ip1,ip2,ip3 redirect on another application ...
0
votes
1answer
55 views

Unable to read warning during boot stage through socat for a virtual serial port

I am trying to deploy Docker image(converted to vmdk - Sata controller - vdi created) on VirtualBox. This is I am doing through automation, at this stage I have enabled serial port "host device" > "...
0
votes
1answer
752 views

Linux virtual tty

I created my own Long Range RF USB. [USB device] -> [Raspberry PI] -> [myTxApp] -> [RF device *(not WiFi)] -> [RF device] -> [Laptop] -> [myRxApp] -> [Virtual device] I tested it on USB Webcam, and ...
3
votes
1answer
3k views

How to make `nc` listen on a port without setting `SO_REUSEPORT`

I want to have a nc command listen on a TCP port so I did: nc -lv 8888 Then in another console I checked if another program trying to listen on the same port would get an Address already in use type ...
2
votes
1answer
824 views

forward a TCP connection with logging using socat

I'm trying to debug a service to which clients connect using TCP (in Linux). I cannot change either program (don't have source), and I cannot make use of mechanisms which snoop on the network layer (...
3
votes
0answers
3k views

Bash 4.4.0 causes nano to fail with Received SIGHUP or SIGTERM

The problem is very specific, but I figured out the conditions for failure: system is: Linux 3.16.0-4-686-pae #1 SMP Debian 3.16.43-2+deb8u2 (2017-06-26) i686 GNU/Linux when i do the following set ...
0
votes
1answer
3k views

SSH Tunnel + Socat UDP Forwarding + multiple clients

I have an Ubuntu machine running a server daemon (Unity3d unet game server in this case) that is designed to communicate with clients solely via UDP. The clients are on Windows 7 and Windows 10. Due ...
1
vote
1answer
982 views

Hide ssh traffic from firewall

Is it somehow (preferably easily) possible to hide ssh traffic from an package inspecting firewall. I thought of basically embedding the ssh session in a harmlessly looking TLS session. I found out ...
10
votes
2answers
7k views

How to keep socat alive using keepalive option

I have this socat command that is running fine, but when no data is transfered, it is dying after exactly 5 minutes and I don't understand why as I've set it up to send 100 keepalive every 10 seconds ...
3
votes
1answer
872 views

How to get an ssh socks proxy on demand?

I know ssh provides a SOCKS proxy with -D. I wonder if it's possible to start such a proxy on demand, the moment a connection is made to a specified port (using the likes of socat and nc under the ...
0
votes
1answer
805 views

Socat keeps waiting for input from stdin

I need to run this command on Mac OS X El Capitan. I found it on this guide about Eclipse Che. However, when I try to do that, socat keeps waiting for input from stdin. $ socat -d TCP-LISTEN:2376,...
2
votes
1answer
577 views

socat and rich terminal again

I start socat on a terminal by executing socat - UNIX-listen:/tmp/sock Then I go to another terminal and start a program (by python) in such a way, that it appears to run in the first terminal, here ...
0
votes
1answer
3k views

Socat not closing tcp connection

I use socat 1.7.3.1-r0 and run following command on an alpine 3.3 linux server: socat -d -d -d PTY,link=/dev/ttyFOOBAR,echo=0,raw,unlink-close=0 TCP-LISTEN:7000,forever,reuseaddr Socat will listen ...
1
vote
0answers
597 views

Linux server to send and receive from RS-232 using socat

I'm trying to bench test a configuration where a Linux server will send and receive RS-232 data from a Black Box RS-232 to Ethernet converter. I've followed this example. I've configured ser2net.conf ...
0
votes
1answer
908 views

How would one pipe from socat to sed to bc to xargs?

I have a server outputting some numbers, I'm reading them with socat, then using sed, I turn those numbers into some math equations, I run them with bc, then I need to pipe them into xargs. socat -u ...
1
vote
0answers
1k views

How can I allow Windows RDP ports with socat?

192.168.0.21 is a Windows 8.1 PC running RDP. Using Linux I am running socat as below, but cannot connect on port 5900 to 3389. How do I make TCP and UDP traffic on 5900 go to 3389? socat TCP-LISTEN:...
1
vote
2answers
333 views

How to make sed print to the end of line from socat

I have a server which sends data in a UDP Broadcast on port 10552. The data is 7 numbers separated by commas as so. 5.351204,0.001968,-0.000473,-0.999222,0.000451,0.001455,1.084310 I fetch this ...
0
votes
0answers
113 views

Forward HTTP traffic to a server behind gateway

I have a server behind gateway, which means it’s only pingable internally. Now I want to forward traffic from a outside server to this internal server. I want to use socat like: socat TCP4-LISTEN:...
0
votes
2answers
353 views

Forwarding a TeamSpeak instance

I’m trying to setup up a TeamSpeak3 server on my home network "net1.mydomain". It uses an IPv4 subnet of 10.0.0.0/8 in LAN; internet access using IPv4 is possible via CGN. This renders IPv4-only-...
3
votes
1answer
3k views

Make socat listen on both IPv4 and IPv6 stacks

Switched providers the other day, they only assign DSlite-connections. I'm fine, I thought. Thing is - I want to access some of my stuff from outside of my network, which should be of much less a ...
0
votes
1answer
431 views

Screen vs. socat

There is already a question: Screen fails to release pty and there is no answer (only a workaround has been provided so far). My case is different and I would like to know the answer to the original ...
0
votes
1answer
334 views

How to create a simple reverse proxy exposing multiple services under single port

The common problem with microservices is that developing them can be cumbersome if you use AJAX and try to read input from multiuple hosts/ports (due to cross domain requests). I am looking for a ...
1
vote
1answer
669 views

Emulate console by sending data on one UDP port, and receive text from another

I'm trying to establish a “console-like” connection with a National Instruments cRIO-FRC. It broadcasts its console output onto 255.255.255.255, UDP port 6666. I can listen to it with: socat UDP-...
0
votes
1answer
3k views

socat as argument to ssh: “bash: socat: command not found”

If I ssh into an osx box from a linux box, issuing socat works fine. However, if I give the socat command as argument to ssh it fails. socat was installed in osx using brew. Any idea why this is ...
2
votes
1answer
607 views

Screen fails to release pty

On my linux box, when using screen I can open, read and write to a pseudo terminal with screen. After closing it (C-a k y) I can't connect to it again, without restarting socat, which provides the ...
2
votes
1answer
2k views

Does an open TCP socket connection consume data when not used?

I have a TCP socket connection established between my server and a modem which has a active GSM module and sim card installed. I create this wirless 3G connection via socat: /usr/bin/socat open:/dev/...
3
votes
1answer
6k views

Impersonate a serial device with socat

I am trying to use socat to impersonate an external serial device. If I do this in one terminal: sudo socat -ddd -ddd PTY,raw,link=/dev/ttyS32,echo=0 READLINE and run this simplified version of my ...
2
votes
0answers
2k views

connect to a serial device via TCP socket

My setup is this: serial device ttyUSB0 connected to laptop A software that opens TCP socket to listen and write to, also runs on laptop A (linux) My goal is to pipe data from/to serial device ...
0
votes
1answer
2k views

Connect COM1 port with socat

Is it possible to connect socat to the COM1 device? I am trying to use example from socat man page socat -,raw,echo=0,escape=0x0f /dev/ttyS0,raw,echo=0,crnl and replace device name /dev/ttyS0 with ...
5
votes
0answers
683 views

Forward IPsec tunnel from IPv4 endpoint to IPv6 endpoint

I have a new ISP and only have a Dual Stack - lite connection now. That means I can't access my router via IPv4 anymore, since the external IPv4 address is private. I have native IPv6 connectivity. ...
3
votes
2answers
3k views

Record multicast stream on multi-homed Linux host

I have what sounds like the simplest possible use case, and yet nothing is satisfactory. I have a multi-homed host and I would like to listen to multicasts on eth1, and shove all the payload (NOT ...
1
vote
2answers
2k views

ssh -R then expose the local port over HTTP?

Here's my scenario, I have two machines, A and B. A is behind a VPN, so B can't get to A. I have a web server: machine_a$ curl localhost:8088 "hello from machine_a" I have executed a remote SSH ...
1
vote
0answers
930 views

How to check if protocol 41 (6to4) is filtered by ISP without changing the network configuration?

Obvious way (just setting up 6to4 tunnel and pinging) fails because ip command seems to be read-only on my VPS: can't change any networking-related settings. So I try using raw sockets: root@78.138....
1
vote
1answer
1k views

Specifying startup commands with socat

I'm connecting to a simple server which is offering a basic text-based interface using socat like this socat readline TCP4:localhost:8090 There are some initial commands I have to execute every time ...
2
votes
1answer
1k views

Dynamic proxy using HTTP CONNECT

My university provides internet access through an HTTP proxy which blocks POP, SMTP, and IMAP. To circumvent this, the IT department's "Internet setup guide" suggests to use socat: socat TCP-L:6660,...
3
votes
1answer
9k views

bidirectional socat functionality with nc

This is question is somehow related to https://superuser.com/questions/270698/how-is-it-called-when-listeningconnecting-two-sockets-and-exchanging-data-betw In the test setup I have three terminal ...
17
votes
3answers
29k views

Netcat/socat behavior with piping and UDP?

I guess this is close to linux - Netcat stops listening for UDP traffic - Super User, but I thought I'd better ask anyways As far as versions of netcat I'm using Ubuntu 11.04 and the default netcat ...