Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


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

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


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

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

Does anyone have ANY suggestions, linux related or not?

Many thanks

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

Rep: Reputation: 64
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. 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 e.g. -> ip1:1234 and -> ip2:5678, but it works only for http service. The default destination port 80 is implied.
Old 09-11-2006, 10:12 AM   #3
LQ Newbie
Registered: Dec 2002
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you marozsas.


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) 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 > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:30 AM.

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