Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Sep 1996 21:23:16 GMT
From:      Adam David <adam@veda.is>
To:        ke6mgb@ix.NETcom.COM
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ampr.org
Message-ID:  <199609122123.VAA06169@veda.is>
References:  <1996829181349529358@ix.netcom.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
>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 <adam@veda.is>



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?199609122123.VAA06169>