[nsp] Port 80 redirect

Petree Jr, Reitzel Reitzel.PetreeJr at Level3.com
Tue Jul 15 02:02:25 EDT 2003


Also for Linux:
You want to redirect a connection to another host and/or port, on the
same or a different machine.

 Solution
Use xinetd 's redirect keyword:

/etc/xinetd.conf or /etc/xinetd.d/myservice:
service myservice
{
        ...
        server = path to original service
        redirect = IP_address  port_number
}
The server keyword is required, but its value is ignored. xinetd will
not activate a service unless it has a server setting, even if the
service being is redirected.

 Discussion
For example, to redirect incoming finger connections (port 79) to
another machine at 192.168.14.21:

/etc/xinetd.conf or /etc/xinetd.d/finger:
service finger
{
        ...
        server = /usr/sbin/in.fingerd
        redirect = 192.168.14.21 79
}
Of course you can redirect connections to an entirely different service,
such as qotd on port 17:

service finger
{
        ...
        server = /usr/sbin/in.fingerd
        redirect = 192.168.14.21 17
}
Now incoming finger requests will instead receive an amusing "quote of
the day," as long as the qotd service is enabled on the other machine.
You can also redirect requests to another port on the same machine.


-----Original Message-----
From: matthew zeier [mailto:mrz at intelenet.net] 
Sent: Monday, July 14, 2003 5:17 PM
To: Gert Doering; Carl Jagerski
Cc: cisco-nsp at puck.nether.net
Subject: Re: [nsp] Port 80 redirect

> The interesting part is the server side - you can do alias interfaces,
or
> transparent proxying (for example via squid), and so on.  Depends on
the
> operating system used and whatever experience you have with the
possible
> web server / web proxy variants you have.
>

Say Linux - how's the magic done there?

I'm trying to do something similiar for some wireless hotspots we're
putting
up but also want to push people to a site that pops up some sort of ad
for
my company.

_______________________________________________
cisco-nsp mailing list  cisco-nsp at puck.nether.net
http://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/



More information about the cisco-nsp mailing list