-   Linux - Networking (
-   -   How to Implement Low Speed Point-to-Point Data Link via Linux networking? (

Paul_N 06-29-2013 09:08 PM

How to Implement Low Speed Point-to-Point Data Link via Linux networking?
How to Implement Low Speed Point-to-Point Data Link via Linux networking?

I asked this question on a Raspberry Pi forum, but only got one response and that didn't really address my question.

I'm not a computer software network person, I'm more of an electronics hardware person. So I need some pointers and suggestions on where to look and how best to get started on a simple network project using two Raspberry Pi systems running Debian Linux to make a data pipe between them.

What I'd like to do is create the functionality of what, in the old days (1960s) in the States was called by the phone company a "nailed-up private line low speed data circuit". The goal being to provide a 24/7 full duplex low speed data pipe between two separated locations. Specifically, I'd like to use two Debian Raspberry-Pis, one in city A and the other in City B, both connected to the internet via Ethernet, to create a simple low speed serial link between those two points, say a full duplex 300 bps ASCII UART link. The endpoints would be residential locations served by a cable modem, so there would be issues of leased IP addresses (rather than static IP addresses) as well as hardware firewall (and also NAT) at each end. I pretty much get that, and can see ways to work around that. The Linux board's serial port hardware could either be the serial port that's integral to the Raspberry Pi, or via a USB-to-serial-port dongle. Either way is fine for my purposes.

What I don't have is knowledge regarding what Linux based networking "service" would be used to get started with something like this, to create the full duplex network link between the Linux boards (the Linux boards having connectivity to each other over the public internet), and get the data from, and put it to, the hardware serial ports on each Linux boards. Any suggestions? It seems to me it might be a little bit like a telnet session, except that I want the near end, and far end, I/O to be serial UART format to a physical hardware port (with the electrical interface as either TTL or RS-232, I can work with either). I don't mind if there's some latency (up to 15 seconds) between what goes in at one end and what comes out at the far end. I have no need for encryption like one might find on a VPN. I just want a simple data pipe between to displaced Linux boards with a hardware port interface using UART type formatting.

Any suggestions as to how best to implement the software for this on a simple Linux system such, as Debian on the Raspberry Pi?

Ser Olmy 06-30-2013 02:20 PM

If I understand correctly, you're looking for a way to link serial ports on two different hosts across the Internet, where both hosts are behind NAT. In that case, there are two different problems to solve:
  1. the two hosts need to be linked somehow, as there is no direct path between two systems behind different NAT endpoints
  2. the serial ports must somehow be linked across the network
The first problem can be solved by forwarding a port from the router to the host at one end, and set up tunneling/VPN. Plain IPsec in transport mode works well in scenarios like this (I can recommend the strongSwan implementation), but I've heard a lot of good things about OpenVPN as well.

If you really don't need/want enctyption, I guess you could use IP-in-IP or GRE tunneling, but since both ends are behind NAT, it may actually be easier to set up a VPN connection; IPsec can work over a single forwarded UDP port while IPIP and GRE are separate IP protocols.

The second problem (linking the serial ports) can be done with socat once a direct network connection is established.

jefro 06-30-2013 04:47 PM

I agree, you can't easily use the internet like old POTS lines.

It may also be possible to use slip.

All times are GMT -5. The time now is 01:25 PM.