LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 11-23-2012, 10:15 AM   #1
jmarcet
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:

Router:
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

Laptop:
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?
 
  


Reply


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 08:14 PM
Difficulty setting up wireless network, running route thiqued Linux - Wireless Networking 9 02-05-2006 04:58 PM
setting up ssh tunnel for vnc jr0 Linux - Networking 3 10-22-2005 11:38 AM
RON (Resilient Overlay Network) guisomera Linux - Software 0 10-19-2005 12:47 PM
Difficulty setting up BT Voyager 2000 Wireless on Slackware 10.0 Apocalypse King Linux - Hardware 0 09-21-2004 12:57 PM


All times are GMT -5. The time now is 12:59 PM.

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