Koozali.org: home of the SME Server

Cloak webpage

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Cloak webpage
« on: December 18, 2006, 01:44:54 PM »
Ok here i go...
I host a webpage and because SME doesn't support dns i have to use other dns providers (zoneedit in my case).

And here's my problem....
Because i use ibays i have to cloak my pages so that people don't know where they are and that they keep their original links.

But i have a problem with google... because my page is cloaked google can't read meta tags from it and i don't know what do to to fix this issue.

Can anyone help with this?
"It should just work" if it doesn't report it. Thanks!

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Cloak webpage
« Reply #1 on: December 18, 2006, 02:20:36 PM »
Someone wrote this...
Quote
A much more clever way to do this would be to use .htaccess and apache rewrite mod.
like thus:

options all
RewriteEngine on
RewriteBase /
RewriteRule <url> /<dir><filename.html>

This will subsitute whatever you put in the <url> for the url and file name directly to the right of it. The user will only see what you want them to see. It can also be use for redirects......

You will need to be running apache mod whether it be windows server or Linux. Hopfully you'll be on a linux box......


How could i do this?
"It should just work" if it doesn't report it. Thanks!

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Cloak webpage
« Reply #2 on: December 18, 2006, 04:28:30 PM »
bpivk

> Because i use ibays i have to cloak my pages so that people don't know
> where they are and that they keep their original links.

Not sure what you are trying to achieve, but are you aware of (Virtual) Domains, and how you point them at an ibay in server manager ?

Users will just see a domain name displayed as the URL even though they are reading content from an ibay.
Your sme server can host many different domains with content in different ibays.
...

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Cloak webpage
« Reply #3 on: December 18, 2006, 06:01:11 PM »
Well i'll put it this way. I have an ibay called roundcube and if i access it from internet i have to type ip/roundcube and i would like it to be mail.domain.com. This is done by dns and cloaking (so that domain stays mail.domain.com).

This wouldn't work if i would just forward my domain because the adress would change to http://ip.of.server/roundcube and i want to keep it as mail.domain.com.

As far as i know sme doesn't support external dns. It works on lan but i need it for internet.

I hope that you understand now.
"It should just work" if it doesn't report it. Thanks!

Offline raem

  • *
  • 3,972
  • +4/-0
Cloak webpage
« Reply #4 on: December 18, 2006, 06:20:28 PM »
bpivk

Cloaking is one way to achieve that.

In sme though, if you create the domain mail.domain.com in the Domains panel in server manager, and then point it at the roundcube ibay (in the Domains panel), then as long as that domain name is a real & valid domain, it will resolve to the roundcube ibay but display mail.domain.com.
...

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Cloak webpage
« Reply #5 on: December 18, 2006, 06:23:58 PM »
But will it do for internet and for lan. Because i read somwhere that this service isn't available for internet but only for computers on local network and that i need some other dns solution to do what i want.

Let me give you a real live case...
I am cloaking www.bezigrad.com and if you go to that page you should see www.bezigrad.com but if you enter bezigrad.com (without www) you should see my ip http://ip or server name http://wegeland...... but not my domain.
"It should just work" if it doesn't report it. Thanks!

Offline raem

  • *
  • 3,972
  • +4/-0
Cloak webpage
« Reply #6 on: December 18, 2006, 06:42:14 PM »
bpivk

> I am cloaking www.bezigrad.com and if you go to that page you should > see www.bezigrad.com but if you enter bezigrad.com (without www)
> you should see my ip http://ip or server name http://wegeland...... but > not my domain

You can do that as I have said using the Domains panel, and it will also depend on whether the wildcard "www" is configured in your external DNS records for the domain name.
You will have local access and external access using the domain URL, to say an ibay on your server, and all you will ever see is the domain name.
I suggest you read the Chapter on Domains if you don't believe me.
Create a free domain or two at www.dyndns.org to test it out at no cost.
Aim each domain name at a different ibay in the serevr manager Domans panel.

Externally though, you configure the DNS records for each domain name you are hosting to point to the external IP of your sme server.
The server will sort out what content to give each domain name based on your settings in the Domains panel.
...

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Cloak webpage
« Reply #7 on: December 18, 2006, 06:55:32 PM »
Ok let me know if i got this...

I have two domains and a dns host at zonedit. I used to webforward domains to http://my.ip/ibay but if i do as you tell me all i have to do is point both domains to my  ip/roundcube = mail.sishell.

Is this correct. If so than i didn't understand the domains chapter. :)

Quote
When you are entering the name for the virtual domain, you should supply the fully−qualified
domain name . This is the full name of the domain, including any extensions like ".com", but
without any prefixes like "www" or "ftp".


This got me puzzled. Because i only wrote domain.com (as it says in the manual) and you say that www.domain.com or mail.domain.com is ok.
"It should just work" if it doesn't report it. Thanks!

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Cloak webpage
« Reply #8 on: December 18, 2006, 09:23:52 PM »
Ok
I tryed your way and it doesn't quite work.

If i enter domain.com it works but only for domain.com not www.domain.com or mail.domain.com so i'm stuck with domain.com and domain1.com resolving but that's it. It doesn't resolve www.domain.com or any other subdomains.

So am i stuck with domains without subdomains? Or hod do i set it to work with subdomains?
"It should just work" if it doesn't report it. Thanks!

Offline raem

  • *
  • 3,972
  • +4/-0
Cloak webpage
« Reply #9 on: December 19, 2006, 05:25:33 AM »
bpivk

>.. It doesn't resolve www.domain.com or any other subdomains.


You have to fix your external DNS records to use the wildcard www in front of your registered domain.
eg at dyndns.org you tick the wildcard box.

As far as other domains/subdomains are concerned you need to register them with valid external DNS records, contact whoever looks after your DNS records for your domains, and have them pointed at your servers external IP.
You would also set up those subdomains in the Domains panel.
...

Offline raem

  • *
  • 3,972
  • +4/-0
Cloak webpage
« Reply #10 on: December 19, 2006, 06:08:34 AM »
bpivk

Depending on how your external DNS records are configured, if  domain.com is configured correctly to point at your server, then mail.domain.com should usually automatically resolve to your sme mail server.

Also check the Hostnames & addresses panel to change that behaviour locally for configured domains hosted on your server.
...

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Cloak webpage
« Reply #11 on: December 19, 2006, 08:29:53 AM »
Ok
So i set a domain.com and webforward it using afraid.org, set mx records and webforward (something.domain.com=ip/ibay)

Is this correct?


And what sohuld i do with "reverse mapping checking getaddrinfo for pc-00247.sishell.net failed - POSSIBLE BREAKIN ATTEMPT!". This occurs when i set my primary domain to resolve trough internet DNS.
"It should just work" if it doesn't report it. Thanks!

Offline raem

  • *
  • 3,972
  • +4/-0
Cloak webpage
« Reply #12 on: December 19, 2006, 09:40:03 AM »
bpivk

> I have two domains and a dns host at zonedit.

At zoneedit you need to add a second entry for the style of www.domain.com ( as well as domain.com).

In external DNS records (eg zoneedit or wherever), each domain name entry (that you host on your sme server) should be set to resolve (point) to the sme servers external (public) IP.

When requests arrive at the sme server, internal domain name configuration/forwarding will resolve to the ibay specified in the Domains panel for that particular domain name.

There is no need for you to externally specifiy the IP/ibay URL.

If you want to use
something.domain.com
then set that up as a valid domain name and point it to sme server external IP.
Then setup that same name in the Domains panel to point at ibay.


> ...This occurs when i set my primary domain to resolve trough internet DNS.

Set it to resolve locally
...

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Cloak webpage
« Reply #13 on: December 19, 2006, 10:16:50 AM »
I'm using afraid's dns now.

So if i'm correct i have to set the a records eg. mail.sishell.net , user.sishell.net , stuff.sishell.net to my external ip. Only A records not webforward.

Thanks for the patience but half of the stuff works now that i have webforward enabled and half of the stuff doesn't work.


Is this what i should do? If so it still doesn't work.
http://89.212.16.101/bio/example.JPG

Or should i resolve my domains localy?
"It should just work" if it doesn't report it. Thanks!

Offline raem

  • *
  • 3,972
  • +4/-0
Cloak webpage
« Reply #14 on: December 19, 2006, 11:32:37 AM »
bpivk

> http://89.212.16.101/bio/example.JPG

All those domains resolve OK for me.


> Or should i resolve my domains localy?

I set my domains to Resolve locally and they work fine for local & external users to access the virtual domain web sites that are in ibays, and users only ever see the applicable domain name URL.
The real location is not obvious to end users.
...

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Cloak webpage
« Reply #15 on: December 19, 2006, 11:37:58 AM »
Yes they work fine now. I guess they just needed some time to refresh dns records.

You said that you have your domains resolve localy....
Ho do you do that because i can specify content (ibay i want to link to) when i choose to resolve it trough internet and this option doesn't exist when i resolve it localy. Or is it ok if i just resolve my domain localy (eg. sishell.net) and leave the mail.sishell.net and other stuff to resolve trough internet.

Do i set the domain (if i want to resolve it localy) trough hostnames and adresses or do i do it the same way i did it with external dns.
I have an option to set hostname (subdomain), domain and location. What do i set for location if i want to have the same efect.

I want to set it to resolve localy just because i have errors like the one i wrote few posts back. Or will the error stop if i empty the var/lib/dhcp/dhcpd.leases files. This resolve error is connected with seting my domain to resolve localy.
"It should just work" if it doesn't report it. Thanks!

Offline raem

  • *
  • 3,972
  • +4/-0
Cloak webpage
« Reply #16 on: December 19, 2006, 11:52:24 AM »
bpivk

> http://89.212.16.101/bio/example.JPG
> Or should i resolve my domains localy?

Quoting from the manual, hoping it will help you.

In most cases the DNS for the server is *not* handled by the server but by some Internet DNS servers. So, the default is to pass DNS requests for anything but the primary domain to the Internet DNS servers.

The primary domain is resolved locally as we generate (fairly) complete DNS records for that domain, including all local hostnames.

The new settings are there to allow for various configurations:

Simple setup where the SME Server is a gateway, but DNS is handled by Internet DNS servers
Moderately complex setup where the SME Server DNS should take preference over the Internet DNS records. You need to be careful here as the external world view will not match the internal world view. That's why it is not the default.
Complex setup where some domains are handled by internal/corporate DNS servers and we want to choose those in preference to the Internet DNS servers. This is a conscious decision to run a split-horizon/internal fake root where the Internet and Intranet have different DNS records.

If you set a domain to “Resolve locally”, the only DNS records seen will be the ones entered on the SME Server. However, since you need to set up the Internet DNS servers with the correct information anyway, why duplicate the work to enter it locally?

Note that in all cases the server will act as a DNS cache/proxy/forwarder and so all domains will actually _technically_ be “resolve locally”, but the dns cache will forward them to the chosen DNS servers.
...

Offline raem

  • *
  • 3,972
  • +4/-0
Cloak webpage
« Reply #17 on: December 19, 2006, 12:09:53 PM »
bpivk

> Ho do you do that because i can specify content (ibay i want to link to) > when i choose to resolve it trough internet and this option doesn't exist > when i resolve it localy.

I have the option to choose either setting in Domains panel.
Is your server a gateway. I notice when set differently in the console when you first setup your sme, if another server is the gateway or set to provide DNS services, then you don't get some options.


> Or is it ok if i just resolve my domain localy (eg. sishell.net) and leave the mail.sishell.net and other stuff to resolve trough internet.

The manual advises to set your main domain to resolve locally and others to resolve to Internet DNS.


The hostnames and adresses panel allows you to specifiy where various "parts" of the domain get hosted eg you could have your web server for domainA on your sme server, but have mail for domainA handled on another server, etc etc etc.
...

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Cloak webpage
« Reply #18 on: December 19, 2006, 12:41:55 PM »
Well domain sishell.net is resolved localy now and mail.sishell.net, www.sishell.net,... is resolved trough internet dns. So that should be ok?

Well mail and other stuff now work. The ony problem i have is with local (sishell.net) domain. http://sishell.net works but www.sishell.net and mail.sishell.net don't work.
"It should just work" if it doesn't report it. Thanks!

Offline raem

  • *
  • 3,972
  • +4/-0
Cloak webpage
« Reply #19 on: December 19, 2006, 02:23:34 PM »
bpivk

> http://sishell.net works but www.sishell.net and mail.sishell.net don't work

http://www.sishell.net gives

Unable to determine IP address from host name for www.sishell.net
The dnsserver returned:
Name Error: The domain name does not exist.

http://mail.sishell.net/
resolves OK to your roundcube webmail login

If you are using afraid.org then you have to pay them extra for the wildcard anything.yourdomain.com
To quote from their new user notification message
If thats still not enough, accounts may be instantly upgraded to
also include:
 - Wildcard DNS ability, *.anything.domain.com flows to you.
...

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Cloak webpage
« Reply #20 on: December 19, 2006, 02:43:39 PM »
Yes i see that mail is working now.
But www.otherdomain.com is working why not sishell.net domain. I have two domains and one works and one doesn't.
"It should just work" if it doesn't report it. Thanks!

Offline raem

  • *
  • 3,972
  • +4/-0
Cloak webpage
« Reply #21 on: December 19, 2006, 03:05:17 PM »
bpivk

>... why not sishell.net domain. I have two domains and one works and one doesn't.

Do you have two DNS entries at zoneedit.com ie for sishell.net and for
www.sishell.net ?

Otherwise your earlier comment may apply
"I guess they just needed some time to refresh dns records. "
...

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Cloak webpage
« Reply #22 on: December 19, 2006, 03:10:18 PM »
I think that i'll wait a day and then report here if it works or not. I have been moving domains to and from zoneedit and afraid and now i'll just stick with zone and wait untill both of them refresh their records.

And thanks for your help and patience


Edit:
It works now, but i have another question...
What do i have to do to point domains to stuff installed in /opt.
I don't have an option to set that in domains.
"It should just work" if it doesn't report it. Thanks!

Offline raem

  • *
  • 3,972
  • +4/-0
Cloak webpage
« Reply #23 on: December 19, 2006, 11:07:37 PM »
bpivk

> And thanks for your help and patience

Good that it all got worked out.


> It works now...

Keep in mind for the future that it can take up to 72 hours for DNS changes to propagate to all DNS/name servers in the world


> What do i have to do to point domains to stuff installed in /opt.

"stuff" installed in /opt gets configured at the time of installation of the application. Typically it is for the main domain of your server & would have a URL like www.maindomain.com/appname.

If you want an alternative domain name to access that, then point the alternative domain name to www.maindomain.com/appname
This is where your external cloaking tools are useful.

Alternatively change the configuration for stuff in /opt to be a new domain URL eg www.newdomain.com
Any requests arriving at your server for www.newdomain.com will automatically open the related stuff in /opt.

I think there are httpd custom templates created that facilitate the URL for apps in /opt, also look in any config file (eg config.php) for those apps.
...

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Cloak webpage
« Reply #24 on: December 19, 2006, 11:18:32 PM »
Thanks.
Well there are only two pages  so i guess i'll cloak them. Both are important only for me so it doesn't matter.

Thanks again
"It should just work" if it doesn't report it. Thanks!