LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-14-2016, 10:32 AM   #1
funkytwig
Member
 
Registered: Jun 2016
Posts: 46

Rep: Reputation: Disabled
Using DNS to stop local domains gong via internet


Hi. We have been having a problem with accessing one of our local servers which has a domain. If access it via its IP the it is very fast but if we use the domain name (its actually a noip.com dydns domain) transfusing data is very slow. Some research has indicated this is because the tragic is going out onto the net and coming back. It also indicated that I can use a DNS server to stop this happening.

So I setup a bind9 DNS and it all seems to be working well. Thing is I cant work out how to 'hard wire' the domain in question to a local IP.

I want to do this as some of the computers are laptops and the domain needs to be accesses outside our network as well as from within it. Its actually a owncloud server so havering to change between domain and IP in the oC client is not practicable.

Regards,
ben
 
Old 07-14-2016, 04:23 PM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by funkytwig View Post
Hi. We have been having a problem with accessing one of our local servers which has a domain. If access it via its IP the it is very fast but if we use the domain name (its actually a noip.com dydns domain) transfusing data is very slow.
The reason for the slowness is most likely because of the TTL on the DNS records. They are normally set low to ensure that the dydns is most accurate. This means that the client in question needs to renew it's dns information about the server it is trying to connect to.


Quote:
So I setup a bind9 DNS and it all seems to be working well. Thing is I cant work out how to 'hard wire' the domain in question to a local IP.
Not sure I understand the question but I'll take a stab at it.

On the bind server you should have a zone file for your domain. Add the server as so to that zone file:

Code:
server name     IN   A   IP Address
Quote:
I want to do this as some of the computers are laptops and the domain needs to be accesses outside our network as well as from within it. Its actually a owncloud server so havering to change between domain and IP in the oC client is not practicable.

You are going to have to make your dns server accessable to the internet. Then you are going to have to update your Domain DNS servers with your DNS servers IP Address (most registers require a minimum of 2 dns servers).
 
Old 07-14-2016, 04:49 PM   #3
funkytwig
Member
 
Registered: Jun 2016
Posts: 46

Original Poster
Rep: Reputation: Disabled
OK, think you slightly misunderstood. I only want to be able to access the local DNS locally. for some reason accessing owncloud at home is not so much of a problem, it seems to be only a real problem doing it at work. Therefore don't think I need to put the local DNS in the DMZ.

My zone file, db.prsc.noip.me, looks like this

;
; BIND data file for prsc.local internal domain
;
$TTL 604800
@ IN SOA pluto.prsc.localhost. pi.localhost. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS pluto.prsc.localhost.
@ IN A 127.0.0.1
@ IN AAAA ::1

; Beow are the A record addresses

prsc IN A 192.168.0.5

; Below are the CNAME record addresses (aliuses) - point ot the A records

server01 IN CNAME prsc.noip.me.


My DNS seems to be working apart from this zone. I can ping pluto (the dns server, router, the router and google.com. If I try to ping prsc.noip.com I get a unknown host error.
 
Old 07-14-2016, 07:50 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
Seems like a lot of work. Couldn't you just put the servers static local IP (web server IP) address into local hosts files?
 
Old 07-14-2016, 07:55 PM   #5
funkytwig
Member
 
Registered: Jun 2016
Posts: 46

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
Seems like a lot of work. Couldn't you just put the servers static local IP (web server IP) address into local hosts files?
Already done most of the work. I want it to be easy for people to set there computers up themselves.
 
Old 07-17-2016, 02:35 PM   #6
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Do you own the noip.com domain? If not then you shouldn't be using it. and that would also explain why it doesn't work from the office.
 
Old 07-18-2016, 06:15 AM   #7
funkytwig
Member
 
Registered: Jun 2016
Posts: 46

Original Poster
Rep: Reputation: Disabled
Its a DYDNS service. I ended up using dnsmasq and it works like a dream.
 
  


Reply



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
[SOLVED] Setting up a local DNS server with blacklisted domains fang0654 Linux - Server 10 12-17-2013 08:31 PM
3 web domains one displays local but web pages do not show on internet meows Linux - Networking 1 01-19-2013 02:11 PM
can a local DNS Server be used to handle dns requests going out to the internet baronobeefdip Linux - Server 1 07-03-2012 03:19 AM
local dns server with no internet access grcunning Linux - Server 1 10-01-2009 08:32 PM
[SOLVED] Postfix: How to stop domains that do not reverse DNS to ip with EHLO restrictions Mogget Linux - Server 2 04-02-2009 12:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:39 PM.

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
Open Source Consulting | Domain Registration