LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-11-2017, 10:18 PM   #1
drillsar
Member
 
Registered: Jan 2017
Posts: 144

Rep: Reputation: Disabled
DNS?


I am confused on how I setup DNS to point to my domain. I am hosting my site on my computer and using freedns to find my site.

Now my machine ip address is 192.168.1.4 which I think is what they call internal IP

in my /etc/hosts file I have:

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

192.168.1.4 mywebsite.com www.mywebsite.com

On Free DNS I set the A record to point to my external ip address which I got from whatismyip.com..

Anything else I need? Everything else good? Or do I also make an A record of 192.168.1.4

What about hostname as well what do I name that? That should be in my router or?

Sorry for all the ?'s
 
Old 02-11-2017, 10:29 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 15,870
Blog Entries: 27

Rep: Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662
Quote:
192.168.1.4
Addresses in the 192.168.xxx.xxx range are for use in local networks, not for publication.

Do you have a static ip address for your router? It's the address of your router that matters, as that is the public face of your network. Then, in your router, you need to forward the relevant incoming ports to the computer in question.

You should also check your ISP's terms of service. In the USA, most ISPs forbid public-facing servers for home users, though some are more aggressive about it than others. For example, my old ISP did not block port 80, so I found it relatively easy to self-host my website (which I no longer do--and I was fully prepared to take it down if they noticed it, but they never did, as it was small and innocuous, plus their terms of service wording was rather ambiguous, but that's another story). My current ISP blocks port 80 unless you have a business-level account.

When I self-hosted my website, I used noip.com for dynamic DNS. You might find their help files very, well, helpful.

Last edited by frankbell; 02-11-2017 at 10:33 PM.
 
Old 02-11-2017, 10:32 PM   #3
drillsar
Member
 
Registered: Jan 2017
Posts: 144

Original Poster
Rep: Reputation: Disabled
Got ya; so in /etc/hosts do I put in local ip or external? No I have DHCP. I will look at noip.com

Thanks
 
Old 02-11-2017, 10:35 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 15,870
Blog Entries: 27

Rep: Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662Reputation: 4662
You should not have to do anything in /etc/hosts. The relevant configuration is all outside your computer.
 
Old 02-13-2017, 04:02 PM   #5
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,234

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
+1 on frankbell's information. The external (Internet-facing) IP address of your router is what you want your DNS name to point to, then forward internally to the appropriate computer (internal IP address, port ...) on your home network as per your router's utility.

Cheers,
 
Old 02-15-2017, 02:20 PM   #6
Cad3
LQ Newbie
 
Registered: Jan 2017
Posts: 6

Rep: Reputation: Disabled
What router do you have?
 
Old 02-15-2017, 03:05 PM   #7
drillsar
Member
 
Registered: Jan 2017
Posts: 144

Original Poster
Rep: Reputation: Disabled
Actiontec
 
Old 02-15-2017, 03:41 PM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137
Quote:
Originally Posted by frankbell View Post
You should not have to do anything in /etc/hosts. The relevant configuration is all outside your computer.
Well, yes and no. Ideally you're correct, however some routers/modems block loopback connections, in which case he would be unable to access his site from inside his LAN using his own external IP address. In that case, he would need to add a line in /etc/hosts to redirect to the server's LAN IP rather than trying to go out and back in again through the router's WAN IP.
 
Old 02-15-2017, 04:27 PM   #9
drillsar
Member
 
Registered: Jan 2017
Posts: 144

Original Poster
Rep: Reputation: Disabled
Well I am able to get to my external ip. However, it's slow is this because of what your talking about @suicidaleggroll
 
Old 02-15-2017, 04:52 PM   #10
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137
No that would just be a yes/no effect, not a throttle. You could put an entry in /etc/hosts which might speed things up a bit, but it may also make it more difficult to troubleshoot networking issues.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Secondary DNS does not resolve the nslookup client requests when the primary DNS is off. To learn Linux - Newbie 3 09-22-2016 07:15 AM
Redirect local DNS query to remote DNS server on non standard port? rock_ya_baby Linux - Server 8 04-13-2010 05:31 AM
i want make DNS server on fedora 8 opreting system plz tell me what is file use DNS nitin gupta Linux - Newbie 2 02-20-2008 06:01 PM
Win2k3 DNS + PFsense DNS Forwarder = No internal DNS resolution Panopticon Linux - Networking 1 11-19-2007 10:59 PM
TEMP_FAILURE: DNS Error: Timeout while contacting DNS servers when receiving emails tonysutherland Linux - Networking 2 02-10-2006 10:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:09 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration