Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/etc/hosts format
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mayday147
l33t
l33t


Joined: 22 Mar 2004
Posts: 825
Location: Bucharest, Romania

PostPosted: Sun Dec 19, 2004 3:26 am    Post subject: /etc/hosts format Reply with quote

I don't know what should I write for my box in /etc/hosts .
1.The box is named 'charlie'
2.The internal domain is .lan and the box is named ns.server.lan
3.The external domain is mayday.gotdns.org

Is this correct: ?

Code:

127.0.0.1               localhost             
192.168.0.247       server.lan                 charlie
82.76.25.14           mayday.gotdns.org             

_________________
gentoo.ro
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Sun Dec 19, 2004 3:30 am    Post subject: Reply with quote

The box is named charlie and ns internally? What does hostname -s and hostname --fqdn return?
_________________
The free market gave me gonorrhea.
Back to top
View user's profile Send private message
mayday147
l33t
l33t


Joined: 22 Mar 2004
Posts: 825
Location: Bucharest, Romania

PostPosted: Sun Dec 19, 2004 3:32 am    Post subject: Reply with quote

Code:

mayday@charlie mayday $ hostname -s
server
mayday@charlie mayday $ hostname --fqdn
server.lan


Code:
mayday@charlie mayday $ cat /etc/hostname
charlie

_________________
gentoo.ro
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Sun Dec 19, 2004 3:50 am    Post subject: Reply with quote

That's a strange domain name. I've never had an fqdn of only two parts (i.e. just host and tld). For instance my hostname is rome and my domain is vatican.com (note the two parts). So my /etc/hosts looks like this:
Code:
127.0.0.1    localhost
192.168.0.1  rome.vatican.com    rome

My /etc/hostname looks like this:
Code:
rome

My /etc/dnsdomainname and /etc/domainname both look like this:
Code:
vatican.com

_________________
The free market gave me gonorrhea.


Last edited by papal_authority on Sun Dec 19, 2004 3:54 am; edited 1 time in total
Back to top
View user's profile Send private message
mayday147
l33t
l33t


Joined: 22 Mar 2004
Posts: 825
Location: Bucharest, Romania

PostPosted: Sun Dec 19, 2004 3:53 am    Post subject: Reply with quote

And what about the extrnal IP . How should it be set?
_________________
gentoo.ro
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Sun Dec 19, 2004 3:55 am    Post subject: Reply with quote

Do you have two NICs or one?
_________________
The free market gave me gonorrhea.
Back to top
View user's profile Send private message
mayday147
l33t
l33t


Joined: 22 Mar 2004
Posts: 825
Location: Bucharest, Romania

PostPosted: Sun Dec 19, 2004 3:56 am    Post subject: Reply with quote

I'm talking about my router, who's acting like a named server as well. And Yes, I have 2 NIC's.
_________________
gentoo.ro
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Sun Dec 19, 2004 4:02 am    Post subject: Reply with quote

mayday147 wrote:
I'm talking about my router, who's acting like a named server as well. And Yes, I have 2 NIC's.

You've got /etc/conf.d/net set up and it brings both NICs up correctly?
_________________
The free market gave me gonorrhea.
Back to top
View user's profile Send private message
mayday147
l33t
l33t


Joined: 22 Mar 2004
Posts: 825
Location: Bucharest, Romania

PostPosted: Sun Dec 19, 2004 4:09 am    Post subject: Reply with quote

Yees. There's no problem with my network, but would like to know if my /etc/hosts file is set-up corectly , as someone told me he couldn't surf my website because he was redirected to 'charlie'. Can you surf a bit to my site and see if it's all OK? http://*edited*.gotdns.org
_________________
gentoo.ro


Last edited by mayday147 on Sun Dec 19, 2004 4:17 am; edited 1 time in total
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Sun Dec 19, 2004 4:16 am    Post subject: Reply with quote

mayday147 wrote:
Yees. There's no problem with my network, but would like to know if my /etc/hosts file is set-up corectly , as someone told me he couldn't surf my website because he was redirected to 'charlie'. Can you surf a bit to my site and see if it's all OK? http://*edited*.gotdns.org

Well I can't read any of it, but it works great :D
_________________
The free market gave me gonorrhea.


Last edited by papal_authority on Sun Dec 19, 2004 5:00 am; edited 1 time in total
Back to top
View user's profile Send private message
mayday147
l33t
l33t


Joined: 22 Mar 2004
Posts: 825
Location: Bucharest, Romania

PostPosted: Sun Dec 19, 2004 4:21 am    Post subject: Reply with quote

So it's all ok. Thanks.

P.S. There's nothing interesting right there. Mostly are bills and obligations for the users :D
P.P.S. Can you edit my site name in your quote, as I have a small bandwidth and don't want to load it.
_________________
gentoo.ro
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Sun Dec 19, 2004 5:02 am    Post subject: Reply with quote

mayday147 wrote:
So it's all ok. Thanks.
P.S. There's nothing interesting right there. Mostly are bills and obligations for the users :D
P.P.S. Can you edit my site name in your quote, as I have a small bandwidth and don't want to load it.

Done.
_________________
The free market gave me gonorrhea.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum