Linode Forum
https://forum.linode.com/

subdomain nslookup works on my local machine, not linode
https://forum.linode.com/viewtopic.php?f=19&t=3591
Page 1 of 1

Author:  schemelab [ Fri Oct 10, 2008 5:12 am ]
Post subject:  subdomain nslookup works on my local machine, not linode

I created a subdomain and the nslookup works just fine on my local laptop:

Code:
Administrator@LIFEBOOK ~ : nslookup applepatch.livingcosmos.org
*** Can't find server name for address 192.168.1.1: Non-existent domain
*** Default servers are not available
Non-authoritative answer:
Server:  UnKnown
Address:  192.168.1.1

Name:    applepatch.livingcosmos.org
Address:  69.56.173.168

Administrator@LIFEBOOK ~ :



But this same lookup fails on my linode, which is where the domain livingcosmos.org is:


Code:
nslookup applepatch.livingcosmos.org
** server can't find applepatch.livingcosmos.org: NXDOMAIN




How can I 'wake up' my linode to this new subdomain?

Author:  freedom_is_chaos [ Fri Oct 10, 2008 10:31 am ]
Post subject: 

Code:
#echo -e "69.56.173.168\t\tapplepatch.livingcosmos.org" >> /etc/hosts


That is the easiest way.

The real way would be to check your DNS entries in your /etc/resolv.conf and make sure you create either a CNAME or an ANAME in your DNS Manager.

*note: the # sign denotes root, or use sudo.

Author:  sweh [ Fri Oct 10, 2008 3:13 pm ]
Post subject: 

freedom_is_chaos wrote:
Code:
#echo -e "69.56.173.168\t\tapplepatch.livingcosmos.org" >> /etc/hosts

*note: the # sign denotes root, or use sudo.

Heh; "sudo echo > blah" doesn't do much of any use 'cos the redirection is done at the calling shell, so you have, effectively "sudo echo" being run with output to "blah"... which happens as the normal user.

Author:  SteveG [ Fri Oct 10, 2008 6:00 pm ]
Post subject: 

Figure out what DNS server your laptop is using (actually, looks like it is a local caching nameserver). Figure out what server your linode is using (should probably be the local Linode nameserver(s)) Figure out why they're different. You may find the dig tool to be more informative than nslookup:
Code:
$ dig @some.dnsserver.name applepatch.livingcosmos.org

; <<>> DiG 9.5.0-P2 <<>> applepatch.livingcosmos.org
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60618
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 0

;; QUESTION SECTION:
;applepatch.livingcosmos.org.   IN   A

;; ANSWER SECTION:
applepatch.livingcosmos.org. 86400 IN   A   69.56.173.168

;; AUTHORITY SECTION:
livingcosmos.org.   86400   IN   NS   ns1.linode.com.
livingcosmos.org.   86400   IN   NS   ns2.linode.com.
livingcosmos.org.   86400   IN   NS   ns3.linode.com.
livingcosmos.org.   86400   IN   NS   ns4.linode.com.

;; Query time: 186 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Fri Oct 10 16:47:38 2008
;; MSG SIZE  rcvd: 143

So it looks like the Linode nameservers have the right data, but your linode is using them.[/code]

Author:  freedom_is_chaos [ Sat Oct 11, 2008 4:34 am ]
Post subject: 

sweh wrote:
Heh; "sudo echo > blah" doesn't do much of any use 'cos the redirection is done at the calling shell, so you have, effectively "sudo echo" being run with output to "blah"... which happens as the normal user.

What?

Author:  mwalling [ Sat Oct 11, 2008 8:30 am ]
Post subject: 

Code:
mwalling@you ~$ sudo echo "something" > /root/somefile
bash: /root/somefile: Permission denied

Author:  sweh [ Sat Oct 11, 2008 9:46 am ]
Post subject: 

freedom_is_chaos wrote:
sweh wrote:
Heh; "sudo echo > blah" doesn't do much of any use 'cos the redirection is done at the calling shell, so you have, effectively "sudo echo" being run with output to "blah"... which happens as the normal user.

What?

Not sure I could say it any simpler, but if you didn't understand the reasoning then just trust me; "sudo echo > blah" does not work.

Author:  sweh [ Sat Oct 11, 2008 9:49 am ]
Post subject: 

mwalling wrote:
Code:
mwalling@you ~$ sudo echo "something" > /root/somefile
bash: /root/somefile: Permission denied

Precisely.

You could even do a different test...
Code:
sweh$ ls -l /tmp/a_new_file
/bin/ls: /tmp/a_new_file: No such file or directory
sweh$ sudo echo hello > /tmp/a_new_file
sweh$ ls -l /tmp/a_new_file
-rw-r--r-- 1 sweh sweh 6 Oct 11 09:48 /tmp/a_new_file


This shows that the file creation (and thus the redirection) is done as the real user and not as root.

Author:  freedom_is_chaos [ Sun Oct 12, 2008 11:08 pm ]
Post subject: 

sweh wrote:
Not sure I could say it any simpler, but if you didn't understand the reasoning then just trust me; "sudo echo > blah" does not work.


Sorry, I must have been really tired at the time. I understand it now though. Thanks.

I didn't even read over the examples :D before I got it. Thanks for them though.

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/