From owner-freebsd-questions@FreeBSD.ORG Mon Dec 3 17:45:29 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC8E9589 for ; Mon, 3 Dec 2012 17:45:29 +0000 (UTC) (envelope-from bonomi@mail.r-bonomi.com) Received: from mail.r-bonomi.com (mx-out.r-bonomi.com [204.87.227.120]) by mx1.freebsd.org (Postfix) with ESMTP id 66ADA8FC13 for ; Mon, 3 Dec 2012 17:45:28 +0000 (UTC) Received: (from bonomi@localhost) by mail.r-bonomi.com (8.14.4/rdb1) id qB3Hkr2o092489; Mon, 3 Dec 2012 11:46:53 -0600 (CST) Date: Mon, 3 Dec 2012 11:46:53 -0600 (CST) From: Robert Bonomi Message-Id: <201212031746.qB3Hkr2o092489@mail.r-bonomi.com> To: freebsd-questions@freebsd.org, saeedeh.motlagh@gmail.com Subject: Re: redirect incoming telnet to com port In-Reply-To: X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Dec 2012 17:45:29 -0000 > From owner-freebsd-questions@freebsd.org Mon Dec 3 07:14:37 2012 > From: saeedeh motlagh > Date: Mon, 3 Dec 2012 16:42:07 +0330 > Subject: redirect incoming telnet to com port > To: freebsd-questions > > 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.