Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 11-23-2012, 11:15 AM   #1
LQ Newbie
Registered: Mar 2011
Distribution: Gentoo
Posts: 13

Rep: Reputation: 0
Question Difficulty setting up a resilient socat tunnel

I'm having a difficulty setting up socat the way I need. The setup I have is as follows:

- Server with the console on the serial port.
- Openwrt router with its serial port connected to the server's.
- Laptop where I would like to access the server's console from.

I have got it working wonderfully, with openssl, running an instance of socat on the router and another one on the laptop. On the laptop I use screen over the virtual pty.

The issue shows up whenever I suspend my laptop or exit screen. I believe the server's serial console gets messed up if the connection with the router is closed. Most of the times I have to reboot the server to have a working console again after resuming my laptop, because of it.

On both sides socat is respawned if killed. I have tried countless options like fork, reuseaddr, ignoreeof, ... Right now I have left it as:

socat -ly -lh openssl-listen:4433,fork,reuseaddr,cert=/etc/server.pem,cafile=/etc/client.crt /dev/ttyS0,b115200,ignoreeof,end-close,shut-none,echo=0,echoctl=1,echoe=1,echok=1,icrnl=1,inlcr=1,isig=1,ixon=1,ixoff=1,onlcr=1,opost=1,raw

socat pty,link=com1 openssl-connect:thallix:4433,reuseaddr,cert=certs/client.pem,cafile=certs/server.crt

Do you see a way to do it or know what might be the reason the server's console is unusable after closing the first connection?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble setting up SSH tunnel tom-ubuntu Linux - Networking 3 02-24-2007 09:14 PM
Difficulty setting up wireless network, running route thiqued Linux - Wireless Networking 9 02-05-2006 05:58 PM
setting up ssh tunnel for vnc jr0 Linux - Networking 3 10-22-2005 12:38 PM
RON (Resilient Overlay Network) guisomera Linux - Software 0 10-19-2005 01:47 PM
Difficulty setting up BT Voyager 2000 Wireless on Slackware 10.0 Apocalypse King Linux - Hardware 0 09-21-2004 01:57 PM

All times are GMT -5. The time now is 11:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration