From owner-freebsd-questions Thu Sep 12 14:23:45 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA04516 for questions-outgoing; Thu, 12 Sep 1996 14:23:45 -0700 (PDT) Received: from veda.is (root@ubiq.veda.is [193.4.230.60]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id OAA04507 for ; Thu, 12 Sep 1996 14:23:39 -0700 (PDT) Received: (from adam@localhost) by veda.is (8.7.5/8.7.3) id VAA06169; Thu, 12 Sep 1996 21:23:16 GMT Date: Thu, 12 Sep 1996 21:23:16 GMT From: Adam David Message-Id: <199609122123.VAA06169@veda.is> To: ke6mgb@ix.NETcom.COM Cc: freebsd-questions@freebsd.org Subject: Re: ampr.org Newsgroups: list.freebsd.questions References: <1996829181349529358@ix.netcom.com> X-Newsreader: NN version 6.5.0 #2 (NOV) Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >I am currently registered under ampr.org - I am ke6mgb.ampr.org. I was >wondering how I can have it, so when someone connects to ke6mgb.ampr.org, it >will automatically route them to another ip or www page? >Thank You, >Rod >KE6MGB - HAM RADIO OPERATOR - IP: 44.16.1.219 <--> KE6MGB.AMPR.ORG If I understood your question right, you need a minimal server program to accept connections on specific port numbers and hand off the connection to another host:port destination. For http it can be done by sending an http redirect. A CGI script to do this from within an http server would be something like this... #!/usr/local/bin/perl print "Status: 302 Moved Temporarily\r Location: http://somewhere.else.org/what.ever/thepage.html\r\n\r\n"; You could write a tiny program that does the bare minimum required to serve the redirection, which might be as simple as just opening the connection and sending the contents of that print statement before closing it again. You might like to use a 301 redirect instead, read the http docs and do what you intend based on what you find. I do not know how to accomplish this for other services, such as telnet or anything else you might have had in mind. I would be interested in what mechanisms exist for handing off (redirecting) connections for other services, rather than passing them on (forwarding). -- Adam David