LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-31-2004, 05:18 PM   #1
netghost
LQ Newbie
 
Registered: Feb 2003
Location: Sweden
Distribution: SUSE 9.1
Posts: 6

Rep: Reputation: 0
DNS question


I have a domain name using a dynamic IP address. However, I'm using the DynDNS service to get by that, and it's working great.
Now to my problem:
I have a Fedora Core 1 Linux box as a firewall (iptables), dhcp (ISC), dns (BIND), mail (sendmail and imap), mysql and a www server (apache). On the other server I'm running Windows Server 2003 with a couple of sites using ASP.
I've set up a zone file in my DNS-server to redirect to the other server when these sites are requested. But it doesn't work.

The Linux server has IP 192.168.0.1, and in Apache I've set up NameVirtualHost to 192.168.0.1:80, and in IIS on the Windows box (which has IP address 192.168.0.2) I've set it up to listen on IP address 192.168.0.2... but when I request a site on the Windows server, the Apache test page on the Fedora box shows up.. what's wrong?

Last edited by netghost; 01-31-2004 at 05:30 PM.
 
Old 01-31-2004, 06:08 PM   #2
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
Are you trying to see these pages from outside?
remember that you have no "autority zone" on your dyndns ip, so you won't be able to tall to your dns from outside.

Also... are you using NAT or somekind of firewalling?

And I would like to see your dns config for your internal zone, maybe the problem is there
 
Old 01-31-2004, 06:31 PM   #3
netghost
LQ Newbie
 
Registered: Feb 2003
Location: Sweden
Distribution: SUSE 9.1
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
remember that you have no "autority zone" on your dyndns ip, so you won't be able to tall to your dns from outside.
Let me see if I got this right.. I can't use my own DNS server if I'm using Dyndns?
 
Old 01-31-2004, 11:48 PM   #4
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Basically, yes, you won't get your desired results using your DNS server. The reason is that dyndns.org's nameserver is answering all DNS requests for your domain name and pointing them to your external IP. It knows nothing of your windows server, or the linux server for that matter, as it only knows your single IP. Your DNS server is not queried for anything coming to you from the outside, because dyndns's server is suppling the DNSing. Your DNS server can only function as an internal DNS server for your local network, in it's present form. Now if you had multiple IPs, then you could direct traffic via DNS. But you can not use an internal IP address for this purpose, like 192.168.0.2, because this is not a valid IP to the outside world.

You can however get around these issues by using a router, iptables for instance. At the router level you can direct all traffic on say port 80 to your apache server and traffic on port 81 to your internal windows server. You'll be stuck using different ports though, as I can't think of anyway to direct traffic on a single port, for a single external IP, to multiple servers. The downside is that in order to navigate to your server that's using the non-standard http port, users would have to append the port to the address in their browser, like http://windows.mysite.com:81. Remember inside your LAN you can have as many IP addresses as you want and with a properly setup DNS server you can run as many servers as you want and you'll be able to resolve any of them, because each PC has it's own IP. But to the outside world, you only have 1 IP and therefore 1 port 80 and etc.

Something else you could do is just run the single Apache server and use a virtual domain for the 2nd site you now have on the windows server. Well actually, you'd need to switch them all to virtual domains, but anyway. Doing it that way, you can have apache load the proper website based on the hostname that was requested and you wouldn't need multiple IPs. This may be your best option, as Dyndns.org allows you to have multiple hostnames.

Simply put, it's not dyndns or your DNS server that's holding you back. It wouldn't matter if you registered a domain and ran your own DNS server, skipping dyndns altogether. You're still stuck with a single IP address as far as the outside world is concerned. And it's the IP address that ultimately decides which computer is called upon.

Last edited by DaHammer; 01-31-2004 at 11:58 PM.
 
Old 02-01-2004, 12:47 AM   #5
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
what DaHammer told you is absolutely true... however if you want to bypasss the system, you may want to register a domain name on a "legal" name server pointing to your dyndns box running a name server, so you'll get autority on that hostname (so you'll be able to register thing like "win2k.yourdomain.com" and "linux.yourdomain.com"..
Nameserver account aren't very expensive, something like 40$ a years I believe.
 
Old 02-01-2004, 05:42 AM   #6
netghost
LQ Newbie
 
Registered: Feb 2003
Location: Sweden
Distribution: SUSE 9.1
Posts: 6

Original Poster
Rep: Reputation: 0
Okay, thanks a lot for your replies guys. At least I know now why it isn't working.
 
  


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
dns question jelgavchik Linux - Networking 1 01-29-2005 02:51 AM
Dns Question ..... har5ha Linux - Networking 7 07-24-2004 03:34 PM
DNS question J_Szucs Linux - Software 4 10-31-2003 03:02 AM
dns question -- new to dns gadhiraju Linux - Networking 7 05-09-2001 05:59 PM
dns question -- new to dns gadhiraju Linux - General 2 05-09-2001 07:44 AM

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

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