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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-11-2017, 09:18 PM
|
#1
|
Member
Registered: Jan 2017
Posts: 144
Rep: 
|
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
|
|
|
02-11-2017, 09:29 PM
|
#2
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,889
|
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 09:33 PM.
|
|
|
02-11-2017, 09:32 PM
|
#3
|
Member
Registered: Jan 2017
Posts: 144
Original Poster
Rep: 
|
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
|
|
|
02-11-2017, 09:35 PM
|
#4
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,889
|
You should not have to do anything in /etc/hosts. The relevant configuration is all outside your computer.
|
|
|
02-13-2017, 03:02 PM
|
#5
|
Senior Member
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
|
+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,
|
|
|
02-15-2017, 01:20 PM
|
#6
|
LQ Newbie
Registered: Jan 2017
Posts: 6
Rep: 
|
What router do you have?
|
|
|
02-15-2017, 02:05 PM
|
#7
|
Member
Registered: Jan 2017
Posts: 144
Original Poster
Rep: 
|
Actiontec
|
|
|
02-15-2017, 02:41 PM
|
#8
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
Quote:
Originally Posted by frankbell
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.
|
|
|
02-15-2017, 03:27 PM
|
#9
|
Member
Registered: Jan 2017
Posts: 144
Original Poster
Rep: 
|
Well I am able to get to my external ip. However, it's slow is this because of what your talking about @suicidaleggroll
|
|
|
02-15-2017, 03:52 PM
|
#10
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
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.
|
|
|
All times are GMT -5. The time now is 12:11 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|