LinuxQuestions.org
Visit Jeremy's Blog.
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 03-31-2010, 11:51 AM   #1
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 63

Rep: Reputation: 16
how to configure bind when using dynamic dns for webserver


Hi everyone,

I am trying to configure a BIND DNS server to handle three websites on my home network, (my site, my sons site and our test site). Since my ISP uses dynamic DNS, we are using DNS2GO to redirect our traffic, 9EACH SERVER HAS IT'S OWN VERSION OF dns2go running).

My problem is that I can't figure out how to configure BIND since I don't have a static IP to enter into the named.conf or reslov.conf configuration files.

Does anyone have any suggestions?

Thanks

zog
 
Old 03-31-2010, 01:43 PM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
Don't use bind.
Assuming you have one router gateway to the net, point all port 80 requests at your "server" and use apache to forward requests for the other websites to the other machines. You can do that using entries in /etc/hosts if you want to use domain names.
eg in the root directory of your web server make an .htaccess file containing
Code:
RewriteCond %{HTTP_HOST} ^http//\*.their_domain\.com/
RewriteRule (.*) http://192.168.1.65
or
Code:
RewriteCond %{HTTP_HOST} ^http//\*.their_domain\.com/
RewriteRule (.*) http://www.their_domain.com
in /etc/hosts add a line for each separate domain

Code:
192.168.1.65	www.their_domain.com	
192.168.1.66	www.their_other_domain.com
Obviously amend the domain names and ip addresses as necessary.

BTW, running the update client on each machine is unnecessary and will get you warned about abusive updating. They all share the same public ip so only run the client on one machine.

Last edited by smoker; 03-31-2010 at 01:55 PM.
 
Old 03-31-2010, 01:52 PM   #3
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 63

Original Poster
Rep: Reputation: 16
Hi smoker,

Ok, this is what I am understanding form your reply;

Build another machine, (I am using Virtualbox to create virtual servers), then configure Apache to route the traffic to the other servers. The question I have is do I configure it as a proxy server or just the Apache server part?

Thanks

zog
 
Old 03-31-2010, 02:11 PM   #4
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
I have no experience with Virtualbox, so I can't answer your question. In theory it should work exactly the same but in practice ...
I don't see the need for a proxy server anywhere.
As long as the name is pointed to the site then it should work. All requests coming through port 80 will go to the machine that the router forwards port 80 to. How you direct those requests from there is up to you. Assuming the virtualbox machines have routeable ip addresses then it should be no different.
It is only a couple of lines in an .htaccess file and a line in /etc/hosts to test it anyway ...

Last edited by smoker; 03-31-2010 at 02:14 PM.
 
Old 04-04-2010, 06:38 PM   #5
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 63

Original Poster
Rep: Reputation: 16
Hi smoker,

Sorry for the delay in responding to your post, been a little busy for the last day.

I am about to try what you have suggested, however, <i have a question before I get started.

Is it possible to use this method to redirect smtp and pop3 traffic, (along with any other services that I am running)? My servers have qmail running, along with http and ftp.

Googling for more info now, but if you had any suggestion, please let me know.

Thanks

zog
 
Old 04-04-2010, 07:10 PM   #6
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
I don't think that will work with smtp and pop traffic. In that case you really need a gateway server to redirect traffic. If you go the bind route, you need to use something to rewrite your bind config when your public ip changes. Maybe there is a facility in your router you can query to get the new address ?
 
  


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
Dynamic DHCP and DNS Server Bind Chroot on CentOS 5.3 or Ubuntu nyu2009 Linux - Server 2 10-19-2009 01:03 AM
LXer: Howto setup DHCP Server and Dynamic DNS with BIND in Debian LXer Syndicated Linux News 0 07-27-2008 05:11 PM
Bind Dynamic DNS + OpenVPN dlublink Linux - Networking 1 10-12-2007 02:56 PM
advantages/disadvantes of bind dns on my webserver cope Linux - Server 2 04-15-2007 10:34 AM
Fedora Core 4 DHCPD and BIND, cannot get Dynamic DNS to work trainpic Linux - Networking 2 02-25-2006 04:27 PM

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

All times are GMT -5. The time now is 10:26 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