HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: add NAT IP to hostname
Operating System - HP-UX
1834051
Members
2277
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2006 02:51 AM
10-16-2006 02:51 AM
add NAT IP to hostname
We have some NAT ip that we want to add to the hostnames in /etc/hosts will this work
hostname current-ip nat-ip
sharky (ex.69.4.213.108) (ex.10.9.66.55)
Thanks
Joe
hostname current-ip nat-ip
sharky (ex.69.4.213.108) (ex.10.9.66.55)
Thanks
Joe
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2006 03:37 AM
10-16-2006 03:37 AM
Re: add NAT IP to hostname
It's not the correct sintax, the correct sintax will be:
current-ip hostname alias
nat-ip hostname-nat alias-nat
You should not use the same host name for multiple ip address in the hosts file.
current-ip hostname alias
nat-ip hostname-nat alias-nat
You should not use the same host name for multiple ip address in the hosts file.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2006 04:20 AM
10-16-2006 04:20 AM
Re: add NAT IP to hostname
NAT provides a special address outside your computer and since you cannot assign two or more IP addresses to a single hostname, you'll have to create a new hostname, perhaps sharknat or something similar. If you cannot change entries in your DNS server, you'll need to change your /etc/nsswitch.conf file so that /etc/hosts is consulted first, then your DNS server(s). Change the hosts line to read:
hosts: files [NOTFOUND=continue UNAVAIL=continue] dns
Then add the IP address and new-hostname to /etc/hosts. Use nsquery to verify:
nsquery hosts new-hostname
Bill Hassell, sysadmin
hosts: files [NOTFOUND=continue UNAVAIL=continue] dns
Then add the IP address and new-hostname to /etc/hosts. Use nsquery to verify:
nsquery hosts new-hostname
Bill Hassell, sysadmin
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP