LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-11-2006, 07:57 AM   #1
redmeat
LQ Newbie
 
Registered: Dec 2002
Posts: 5

Rep: Reputation: 0
mapping address:port to name in hosts


Hello,

I'm trying to create human readable names for my_linux_box_iport using the hosts file. So, for example I would like:

127.0.0.1:2119 niceName1
127.0.0.1:2219 niceName2
127.0.0.1:2319 niceName3

I have tried using /etc/hosts and it won't allow ports.

Does anyone have ANY suggestions, linux related or not?

Many thanks

Jack
 
Old 09-11-2006, 09:00 AM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 63
There is no way to do what you are looking for.

IP addresses and port numbers are two separated things and there is no way to assign a simple name to a ip:service pair.

You can assign a simple name to a ip address in /etc/hosts. e.g. 127.0.0.1 nicename.
You can assign a simple name to a port number in /etc/services, e.g. 23 telnet.

You can even assign a web address to be redirected to a ip/port (other than the default 80) using some redirect service like the one provided by dyndns.org. e.g. www.niceName1.com -> ip1:1234 and www.niceName2.com -> ip2:5678, but it works only for http service. The default destination port 80 is implied.
 
Old 09-11-2006, 10:12 AM   #3
redmeat
LQ Newbie
 
Registered: Dec 2002
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you marozsas.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
API for mapping Physical Address to Virtual Address Lakshman_smt Linux - Software 2 10-15-2006 09:08 PM
Memory Mapping (same physical address = virtual address) skd.tech Linux - Kernel 7 07-24-2006 11:13 PM
port mapping shoaib Linux - Networking 4 10-09-2004 01:51 PM
IP address to domain name mapping htm Linux - Software 0 06-20-2004 07:16 PM
DAM (dynamic address mapping) ?? Netzland Linux - Software 0 03-11-2004 10:32 AM


All times are GMT -5. The time now is 05:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration