redirect incoming telnet to com port

Robert Bonomi bonomi at
Mon Dec 3 17:45:29 UTC 2012

> From owner-freebsd-questions at  Mon Dec  3 07:14:37 2012
> From: saeedeh motlagh <saeedeh.motlagh at>
> Date: Mon, 3 Dec 2012 16:42:07 +0330
> Subject: redirect incoming telnet to com port
> To: freebsd-questions <freebsd-questions at>
> hello everybody
> i have freebsd8.2.  i want to redirect incoming telnet from telnet port to
> a com port. i mean if somebody telnet to my system with a specific port (or
> 22 which is default telnet port), connect to com port and can talk to modem
> (something like cisco).
> is it possible or not?

Possible, yes, but you do NOT want to do it THAT way.  It bypasses all system
access controls.

set up a special purpose userid with a login script that runs a terminal
program (via 'exec') like kermit with a start-up script for that program
that selects the proper port and then sets the needed serial settings, and 
goes into 'connect' mode.  whed they exit the terminal session, they're
automatically logged off the system.

More information about the freebsd-questions mailing list