Share serial connections over Ethernet



  • Right next to my pfsense machine is some other equipment that I have to take a look on from time to time by a USB-TTL-Converter that is connected to it. Right now I am doing this with my Laptop. But to simplify this task I would like to connect all the USB-TTL converters (PL2303HX ) to the pfsense machine permanently and share the serial connection over ethernet. How can I  achieve this with pfsense?



  • What kind of devices are there connected to the pfSense?
    pfSense got an IP address and then you only need the serial or com interface number where the
    devices are connected to. Thats it, then you will be able to connect to pfSense and send a command
    to this ports doing what you will or need.

    Or should this be a VPN connection to the pfSense box?



  • There are various devices that all have a serial console (Raspberry Pi, AVR Net-IO, Access Point etc.).
    Log on to pfsense console and do it from there is not a good option as also some other people must have access to it to monitor things. Waht i thought of was having something like a device server software that offers each serial console on a specific port on the pfsense machine and allows you to connect to it using ssh and then are dropped to the serial console directly.



  • If you're willing to do some research, look into the socat utility available for most *nix variants as well as FreeBSD.

    It will allow you to pipe a serial connection over a TCP port.
    It's often used to remote connect things like a modem over a net connection.

    If you have something like a R-Pi on the site, it might be a better box to host a multi-serial server than pfSense since it has a network connection that could talk to pfSense anyway.

    I don't have a good how-to, but Google should get you started in the right direction.


  • LAYER 8 Netgate

    I got an old avocent/cyclades terminal/console server for my lab rack.  It's a little loud and hungry to leave on all the time.

    Telnet to it on 7001, get port 1, 7002, get port 2, etc.

    Works just fine for APU console ports, too.

    I know the old livingston/lucent Portmaster 2e can be made to do this as well.



  • Hello again,

    perhaps a KVM switch from Aten or similar vendor would be really solving this out!
    All devices could be connected to this and then you only have to connect to this device
    thats it.



  • ser2net can be installed via 'pkg install'.



  • Thanks for your replies. Well additional hardware is not my first choice if the task can be achieved with the hardware I got on site already. I came across this website and found socat also likely the best choice.
    But will take a look at ser2net as cmb suggested and get it installed / set up.



  • How do I connect from a remote client to the ser2net port?



  • @fraglord:

    How do I connect from a remote client to the ser2net port?

    Connect via VPN (external) or SSH (internal) to the pfSense box and then you could connect over the ser2net
    application to the ports directly.


Log in to reply