views:

134

answers:

1

How I can map a service running on a specific port number to an alias on Ubuntu 8.10?

For example, I have a webservice which I can access like this:

http://localhost:3000/

But I want to access like this:

http://myservice/

I only want to access the service from the same machine.

I am running Ubuntu 8.10 and I thought at first I could modify the /etc/hosts file but I now understand I cannot include port numbers. I also looked at /etc/services file without any luck so far...

+2  A: 

The default port for "http" is 80, so you need root privileges to do this. There are several routes you can take:

  • ssh -l root -L 3000:localhost:80 localhost
  • netcat should be able to do this, too
  • Use the firewall to forward packets
Aaron Digulla

related questions