LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-31-2007, 07:56 AM   #1
UnrealX
Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Ubuntu, CentOS
Posts: 36

Rep: Reputation: 15
Redirect DNS queries?


I am transfering all my sites from one server to other and have a couple of domains parked on primary domain (ns1.example.com, ns2.example.com). I could just change nameservers of that domain, however I would still have to wait up to 48 hours for my site to become accessible in new server.
I was thinking, would it be possible to redirect DNS queries to a new server somehow? Using iptables perhaps?
 
Old 07-31-2007, 08:27 AM   #2
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
use apache reverse proxy services. However its no meaning, after you completely read information, testing and configuring already ~2 days(After you read my post).
 
Old 07-31-2007, 08:45 AM   #3
UnrealX
Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Ubuntu, CentOS
Posts: 36

Original Poster
Rep: Reputation: 15
I do have mod_proxy set up on apache, however (if I understand correctly what reverse proxy is) it will only work for HTTP traffic, also REMOTE_ADDR header will be set to server IP (might break some scripts) and finally, it will use twice the bandwidth.

Wouldn`t redirecting DNS be more elegant solution?
 
Old 07-31-2007, 09:29 AM   #4
fur
Member
 
Registered: Dec 2003
Distribution: Debian, FreeBSD
Posts: 310

Rep: Reputation: 35
Why don't you migrate all the zones to the new server via a zone transfer, switch the new server to master once it has compelted, and leave the old server running until it no longer receives queries. Once the root servers start delegating the domains to the new server you can then decommission the old server when its no longer needed.
 
Old 07-31-2007, 06:15 PM   #5
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
Quote:
Originally Posted by UnrealX
it will use twice the bandwidth.
Yes it will use twice
Wouldn`t redirecting DNS be more elegant solution?
I not sure, since you need to use domain name insdeed of ipaddress, I think untill the end client will still find your old server if client dns still point to you(And probably you have no way to update their dns server unless the dns server had get replicate from new setting)
 
Old 08-01-2007, 02:27 AM   #6
UnrealX
Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Ubuntu, CentOS
Posts: 36

Original Poster
Rep: Reputation: 15
Apache 1.3 doesn`t have all the fancy options apache 2.2 has.
Nevertheless I did my best to set up a reverse proxy.
At first it didn`t work becouse destination server has to receive a `host` header instead of only IP. I`ve bypassed this by appending domain I am redirecting and destination server IP to /etc/hosts and making request directly to domain.
I could then open title page fine, however requesting other pages did not work, I got a HTTP error.
While I am sure this can be fixed, reverse proxy is very slow as servers are on different networks.

Any help highly appreciated.
 
Old 08-01-2007, 05:25 AM   #7
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
During you wait the solution, I guess your new web server's DNS record has been sync to world wide. Let us know your new website then we can have a try(put little bit difference between your both website so we can recognize it).
 
Old 08-01-2007, 05:52 AM   #8
UnrealX
Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Ubuntu, CentOS
Posts: 36

Original Poster
Rep: Reputation: 15
No, it hasn`t synced completely yet. I see quite some traffic flowing to the new server already, but it might still take a couple of days for dns to completely resolve for some ISPs.
I`ve altered named configuration in old server so primary domain points to new IPs, however it`s not much of a help as providers still have to re-cache DNS.
 
Old 08-01-2007, 10:37 AM   #9
fur
Member
 
Registered: Dec 2003
Distribution: Debian, FreeBSD
Posts: 310

Rep: Reputation: 35
If you are concerned of a server caching a response then beforehand lower the TTL to something like 5 minutes. This will allow faster synchronization times so that cache servers don't keep old records. Then once the change is complete up the TTL back to its normal value.
 
Old 08-01-2007, 10:50 AM   #10
UnrealX
Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Ubuntu, CentOS
Posts: 36

Original Poster
Rep: Reputation: 15
Primary domain is now being resolved correctly, however ns1.primarydomain and ns2.primarydomain still resolve to old IP address.
I`ve created separate named entries for them and pointed to new IP (I have ttl of 4hrs), however hours have passed without any result.

Anyway, most visitors already are being directed to new server and I want to continue this thread just so I can migrate easier next time.

Offtopic: do I have to contact server ISP to set-up RDNS (Reverse DNS) or will named entry suffice?
 
Old 08-01-2007, 07:44 PM   #11
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
If you host email server this is necessary, otherwise not so important.
 
Old 08-02-2007, 04:07 AM   #12
UnrealX
Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Ubuntu, CentOS
Posts: 36

Original Poster
Rep: Reputation: 15
I`m aware of that. I host a couple of services that periodically send e-mail.
 
Old 08-02-2007, 04:23 AM   #13
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
actually reverse lookup is useful for receipient email server to check whether your email server is a spam source or not. If you services is not email server(they are email client), then you can simply forget about it(Setting up a new email server can be very troublesome).

However, normally reverse lookup zone normally is heavy and you need to apply from ISP.
 
Old 08-02-2007, 05:05 AM   #14
UnrealX
Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Ubuntu, CentOS
Posts: 36

Original Poster
Rep: Reputation: 15
Oh, thank you for clarifying that. I thought RDNS address was requested by recipient server to prevent spam. Looks like I misunderstood the whole concept of RDNS then.
 
  


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
Limit DNS queries nhaunold Linux - Networking 1 07-09-2007 02:18 AM
ipv6 queries to dns peacebwitchu AIX 0 11-10-2005 06:57 PM
iptables - not broadcasting for dns queries raven02 Linux - Networking 1 06-08-2004 11:47 PM
DNS Queries lcplutz@wincor Linux - Networking 2 06-04-2004 06:59 AM
Some queries related to DNS(bind) coolamit78 Linux - Networking 1 12-19-2003 03:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:25 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
Open Source Consulting | Domain Registration