[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Playing with domains: virtual host



Hi,

On Thu, 14 Mar 2002, Alvin Oga wrote:

>
> hi ya sebastian
>
> if www.cosjoan.box.nl is redired to www.box.nl...
> than you might as well give up unless oyu can modify
> the dns or the firewall for box.nl  or
> modify www.box.nl
>
No, but the problem is that the ip of www.box.nl and www.cosjoan.box.nl
are the same. So when someone requests to see www.sacred-key.org I want
the webserver to think www.cosjoan.box.nl was asked. But since I do not
have any access to the webserver and running apache for redirection is not
really an option, I was thinking of tricking the system.

> ie.. you need to stop box.nl from doing what its doing...
> 	( redirecting all http traffic to www.box.nl )
>
> but when i use netscape for  www.cosjoan.box.nl
> i get the sacred-key webpages...
>
>
> guess i dont understand all the various machines involved..
> but it seems that www.cosjoan.box.nl  reditrected
> to show sacred-key's web pags ??
>
> www.sacred-key.org is default stuff w/ ads... ??
>
> you uneed to fix the dns for sacred-key.org
> 	to redirect to www.cosjoan.box.nl ??
>
> 	which is your original problem ???
>
Ok, explaining the situation and idea is harder than I thought :-).

There are two machines involved:
- my DNS server for sacred-key.org , which is in fact nothing more than a
firewall for my local network - I have full access to this machine, but
not allowed to run a webserver

- the webserver from a provider. The address is www.cosjoan.box.nl - I
have no access to this computer (except for uploading pages)


I want that when someone enters www.sacred-key.org the page at
www.cosjoan.box.nl is displayed. The most direct way to do this is to
enter a line like this to db.sacred-key:
www             IN      CNAME   www.cosjoan.box.nl.


But the problem is that www.cosjoan.box.nl is a virtual host and has the
same ip as the webserver's homepage, www.box.nl.


This is the idea I have of how an ordinary request to www.cosjoan.box.nl
is made (without my interaction):
- the browser looks up the IP for www.cosjoan.box.nl
 -> authorative answer from ns.box.nl
- it connects to that IP on port 80
- it requests the information for the domain www.cosjoan.box.nl
 (should be something like: GET / HTTP/1.1, Host: www.cosjoan.box.nl )
- the file index.html from the virtual domain www.cosjoan.box.nl is received

But, when I request www.sacred-key.org, this happens:
- browser looks up IP for www.sacred-key.org
 -> authorative answer from ns.sacred-key.org
- it connects to the same IP as www.cosjoan.box.nl
* but it requests the default page for domain www.sacred-key.org on that
server. This is nonexistent, so the default page of that IP (www.box.nl)
is displayed.


I am not sure how to solve this with DNS. The DNS server should return the
new domain name too, not only it's ip.

Thanks in advance,
Sebastiaan

>
> 	== please post the sacred key's  named.conf
...
// add entries for other zones below here

// sacred-key.org naam -> adres
zone "sacred-key.org" {
        type master;
        file "/etc/bind/db.sacred-key";
};

// sacred-key.org adres -> naam
zone "123.163.62.in-addr.arpa" {
        type master;
        file "/etc/bind/db.sacred-key-rev";
};


> 	== and named.sacred  ( db.sacred ) etc...
; BIND data file for sacred-key.org

$TTL    86400
@       IN      SOA     ns.sacred-key.org.      root.sacred-key.org. (
                        2002031401      ; volgnummer
                        10800           ; Refresh
                        3600            ; Retry
                        3600000         ; Expire
                        86400   )       ; Default TTL
                IN      NS      ns1.sacred-key.org.
                IN      MX  25  mail.sacred-key.org.
                IN      MX  50  mail.chello.nl.
                IN      A       62.163.123.215
mail            IN      A       62.163.123.215
ns              IN      A       62.163.123.215
ns1             IN      A       62.163.123.215
ns2             IN      A       62.163.123.215
ftp             IN      CNAME   mail.sacred-key.org.
onix            IN      A       213.10.33.89
aluqah          IN      A       62.163.123.215
www             IN      CNAME   www.cosjoan.box.nl.

>
> have fun
> alvin
>
>
> On Thu, 14 Mar 2002, Sebastiaan wrote:
>
> > Hi,
> >
> > On Thu, 14 Mar 2002, Alvin Oga wrote:
> >
> > >
> > > hi ya sebastian
> > >
> > > > I am trying to trick a webserver with bind. This is the situation:
> > > >
> > > > - I have a domain server for sacred-key.org
> > >
> > > - am ignoring email, ftp, ping, etc.etc..
> > > 	since oyu didnt mention where you want those to be directed
> > that all stays on the sacred-key.org server. Only the www is redirected.
> >
> > >
> > > named.sacred file
> > >
> > > 	# dont foreget to increment your serial number
> > > 		IN	SOA	... (
> > > 				serial number ;
> > > 				) ;
> > > 	...
> > > 	...
> > > 	# brute-force redirect www.sacred-key.org  to this other server
> > > 	www	IN	A	www.cosjoan.box.nl
> > >
> > tried, but was unsuccesful. This is directl redirected to www.box.nl,
> > which is the real host.
> >
> > > restart dns
> > >
> > >
> > > where is the dns for cosjoan.box.nl ???
> > > where is the dns for the "real machine" hosting the virtual domains ??
> > > 	- what is its contents/records ??
> > >
> > > > - I have a webpage which is located at www.cosjoan.box.nl, which is in
> > > > fact a virtual host
> > >
> > > on the real machine that hosts the virtual domain www.cosjaoan.box.nl
> > >
> > > #
> > > # assuming that the apache config is here
> > > #
> > Sorry, I was incomplete with my information. I do not have any access to
> > the server where the actual page is located. That is why I wanted to trick
> > things.
> >
> > Thanks,
> > Sebastiaan
> >
> > >
> > > have fun
> > > alvin
> > >
> > >
> > > > - I would like configure bind so that a query www.sacred-key.org brings up
> > > > the www.cosjoan.box.nl page.
> > > >
> > > > I do now that it is standardly not possible, so I tried to trick a bit.
> > > > Once I added the following two lines to my zone file:
> > > > www             IN      NS      www-dns
> > > > www-dns         IN      CNAME   ns.foo.nl.
> > > >
> > > > This lets the nameserver ns.foo.nl think that the query www.sacred-key.org
> > > > was asked directly to ns.foo.nl and not via via.
> > > >
> > > > This is what I had in mind:
> > > > - in the db.sacred-key zone file, redirect www to www.cosjoan.box.nl, with
> > > > the local zone file
> > > >
> > > > - create a db.cosjoan.box.nl zone file
> > > > - redirecty the www query to the ns.box.nl nameserver as if it was
> > > > directly queried by www.cosjoan.box.nl.
> > > >
> > > >
> > > > I have tried to setup something like this, but have not succeeded yet.
> > > > Anyone willing to give this idea a thought?
> > > >
> > > > Thanks in advance,
> > > > Sebastiaan
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > >   NT is the OS of the future. The main engine is the 16-bit Subsystem
> > > >   (also called MS-DOS Subsystem). Above that, there is the windoze 95/98
> > > >   16-bit Subsystem. Anyone can see that 16+16=32, so windoze NT is a
> > > >   *real* 32-bit system.
> > > >
> > > >
> > > >
> > > > --
> > > > To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> > > > with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> > > >
> > >
> >
>



Reply to: