Koozali.org formerly Contribs.org

Can't get external website working

Can't get external website working
« on: May 15, 2013, 08:17:16 PM »
Hi, long time user here. Never had a reason to post before since the E-Smith/SME Server systems have always worked perfectly for me. I'm running into a problem with a version 7 server. The issue is exactly as described in the following thread:

http://forums.contribs.org/index.php/topic,49109.msg244857.html#msg244857

I have not tried the suggested work around described in the thread. Any one have an idea or suggestions as to how I can correct this issue?

The problem follows exactly the same pattern described in the thread. Can ping the website from command line, resolves to correct IP, no workstation on the network can get to the external website, only the built in SME website. That includes using Lynx on the server as well, always the built in website, not the correct external website.

Any help would be appreciated.

Thanks

guest22

Re: Can't get external website working
« Reply #1 on: May 15, 2013, 11:40:25 PM »
Hi, long time user here. Never had a reason to post before since the E-Smith/SME Server systems have always worked perfectly for me.

Welcome! There should have been a zillion reasons for you to post or try to assist others after such a long time. Apparently SME Server has served you well, not at the least with it's stability apparently.

Quote
I have not tried the suggested work around described in the thread. Any one have an idea or suggestions as to how I can correct this issue?

Come again please? Suggestions have been made, and you did not bother to try them??

So how about you donate, get involved and maybe others will appreciate that by trying to help you out? After all, that's what makes the SME Server world go round and SME Server has been good to you hasn't it?

Offline janet

  • ****
  • 4,798
Re: Can't get external website working
« Reply #2 on: May 16, 2013, 01:32:27 AM »
lpbbear


When you created the domain name in server manager panel, or otherwise if it is the default, then take a look at the Domains panel in server manager, is the setting for DNS set to Resolve locally or Resolve to external DNS servers (or similar words).
Resolve externally would be appropriate.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Re: Can't get external website working
« Reply #3 on: May 16, 2013, 02:01:40 AM »
lpbbear


When you created the domain name in server manager panel, or otherwise if it is the default, then take a look at the Domains panel in server manager, is the setting for DNS set to Resolve locally or Resolve to external DNS servers (or similar words).
Resolve externally would be appropriate.

Yes, I did try that. (see below)

This one just refuses to work and is acting exactly like thread I linked to in my original post. I did not try the suggested work around in the linked thread because CB appears to not be very approving of it. I thought there might be a better way to solve why the setting for remote Hostnames and addresses is not working.

I did also try changing the Domain to use external DNS servers which did work but unfortunately I lost VPN connectivity after that change. Since that is also needed I had to revert back to local until I can solve the original issue of why setting the www.mydomain.com Hostnames and addresses from self to remote with the external Internet IP address won't work. This server only has the website hosted offsite. Email is handled by the server itself. Server only handles one domain.

Thanks for your response.

Offline janet

  • ****
  • 4,798
Re: Can't get external website working
« Reply #4 on: May 16, 2013, 02:32:08 AM »
lpbbear

Quote
I did also try changing the Domain to use external DNS servers which did work but unfortunately I lost VPN connectivity after that change.

There is no problem or error here to be "worked out".
You cannot have the same domain name resolving to two different locations ie to an external site & to your server.
You need to use external DNS to resolve web requests from behind your server correctly, in order to reach the external site.

You could give your server a different domain name, but as you want mail to resolve to your server then that's not really an option.

In the Hostname & addresses panel you can specify which services are forwarded to where, so set www to the external location, assuming you use the Resolve locally setting for the Domain. All other services will resolve locally.
Restart your server after making these changes so they correctly take effect.

Make sure you then flush your local web browsers caches.

This is common issue, but it is not a fault of sme server, it is wrong thinking & configuration by the administrator.

Alternatively & perhaps the best answer in my opinion, is to configure external DNS records to point www at the external website, & mail (& I assume everything else eg VPN) at your server fixed IP. In that case leave the sme server set to Resolve to external DNS servers. You may need to get help from the company who manages your domain registration/hosting/DNS.

There are pros & cons of each approach & you may prefer one over the other.

Search these forums as this has been asked many times, going back many years.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Re: Can't get external website working
« Reply #5 on: May 16, 2013, 06:03:12 AM »

There is no problem or error here to be "worked out".

Yes....there is...otherwise I wouldn't be typing this.

You cannot have the same domain name resolving to two different locations ie to an external site & to your server.

I am aware of that and was not trying to do that at all.

You need to use external DNS to resolve web requests from behind your server correctly, in order to reach the external site.

As I mentioned I did that and while that did correct the problem with clients on the LAN being able to access the external website I also lost VPN connectivity to the server.

You could give your server a different domain name, but as you want mail to resolve to your server then that's not really an option.

No, it is not an option

In the Hostname & addresses panel you can specify which services are forwarded to where, so set www to the external location, assuming you use the Resolve locally setting for the Domain. All other services will resolve locally.
Restart your server after making these changes so they correctly take effect.

I have already done that. I will try it again for grins. Perhaps it will actually work this time.

Make sure you then flush your local web browsers caches.


Perhaps I should flush the "Lynx" cache as well eh.

This is common issue, but it is not a fault of sme server, it is wrong thinking & configuration by the administrator.

Not sure I care whose "fault" it is but thanks for the thought.

Alternatively & perhaps the best answer in my opinion, is to configure external DNS records to point www at the external website, & mail (& I assume everything else eg VPN) at your server fixed IP. In that case leave the sme server set to Resolve to external DNS servers. You may need to get help from the company who manages your domain registration/hosting/DNS.

Again the issue is as follows: (Quoting from Smeghead)

Hi all

Something thats bugged me off & on for a good while finally drove me to investigate it in detail & come up with a solution.

I have a number of clients that use an SME as a proxy/gateway & usually email, but they have their website hosted externally; the system may or may not have an internal Windows server providing DNS/DHCP, it doesn't seem to matter.

When the clients site is hosted externally I have gone to the hostnames panel & changed the 'www' host to point to the external IP, saved, only to find that the www is still resolved to the SME no matter what I do;  I have done a full signal-event update cycle to see if it fixes, nope;  changed DNS resolution to point to SME explicitly, nope;  cleaned out the Squid cache, nope; cleaned the browser cache, nope; turned off squid, nope, use a different computer, nope .. funnily enough I never tried turning off the HTTP proxy as I didn't expect it to be Apache, at least to start with.

If I ping the hostname it resolves correctly, be it from the SME itself or a workstation, but try to access via a browser & we get the SME.

That is EXACTLY what I am seeing.

Search these forums as this has been asked many times, going back many years.

I am well aware of how to search the forum. I was one of the first E-Smith customers many years ago.

Thanks

Offline janet

  • ****
  • 4,798
Re: Can't get external website working
« Reply #6 on: May 16, 2013, 08:34:49 AM »
lpbbear

I meant there is no known fault with sme server, that this is an issue with how the system administrator sets everything up including external DNS records.

If you feel you have set the server appropriately, then you need to tell us what the specific settings are that you have made, including domain names, hostnames & addresses settings, external IP number of the hosted site, external IP number of your server etc. We need this info to diagnose.
There is no use saying it's the same as what someone else said, we need to hear details of your specific issue & setup etc.

You also need to tell us what else you have installed & what other setting changes you have made with custom templates etc.
As was said before there are a thousand reasons why !

Otherwise you can lodge a bug report if you believe sme has a problem or bug. I expect you will be asked all of the above plus more, so be prepared to be forthcoming with information specific to your situation.

I have used sme since v3, many here have a long history with sme server.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Re: Can't get external website working
« Reply #7 on: May 16, 2013, 04:49:26 PM »
I meant there is no known fault with sme server, that this is an issue with how the system administrator sets everything up including external DNS records.

The system is setup correctly. The DNS is correct. It is not a problem with "how the system administrator sets everything up".

If you feel you have set the server appropriately, then you need to tell us what the specific settings are that you have made, including domain names, hostnames & addresses settings, external IP number of the hosted site, external IP number of your server etc. We need this info to diagnose.
There is no use saying it's the same as what someone else said, we need to hear details of your specific issue & setup etc.

The issue is with the SME Server and has nothing to do with outside DNS. Outside DNS is working perfectly. The reason for using the linked post is because after digging through the forums I discovered that his symptoms match what I am seeing exactly. The settings being used are basic settings and the only area that is NOT working is in the www section of the Configuration/Hostnames and Addresses where I have set it to a external remote IP address. The server will only feed the client the built in web site. ("this website is under construction") This behavior is coming from the SME Server itself including when testing with "Lynx" or "ELinks" on the server itself even though a ping of the www.mydomain.com on the server itself resolves to the correct external IP address.

You also need to tell us what else you have installed & what other setting changes you have made with custom templates etc.
As was said before there are a thousand reasons why !

There are no customizations, addons, or any custom changes. It is a plain jane vanilla SME Server that has had nothing but standard updates applied to it.

Otherwise you can lodge a bug report if you believe sme has a problem or bug. I expect you will be asked all of the above plus more, so be prepared to be forthcoming with information specific to your situation.

It is quite clearly either a bug or some other issue on the server itself that is not working as designed.

I have used sme since v3, many here have a long history with sme server.

As I mentioned I go back well before that. Perhaps someone else has some insight and can step in. I have found a workaround by bypassing the server for the time being. Since it is version 7.6 and is reaching EOL in a week or so I may just opt to move it to version 8 and see if it still does not work.

guest22

Re: Can't get external website working
« Reply #8 on: May 16, 2013, 04:55:13 PM »
Quote
It is quite clearly either a bug or some other issue on the server itself that is not working as designed.

I suggest you file a bug report if you think it's a Vanilla SME Server issue. Devs will be able to read and respond.

guest
 

Offline Stefano

  • *
  • 10,781
  • Skype account: maghissimo
    • Smeserver italian community
Re: Can't get external website working
« Reply #9 on: May 16, 2013, 05:12:54 PM »
I suggest you file a bug report if you think it's a Vanilla SME Server issue. Devs will be able to read and respond.

guest
 

OP should open a bug asap, even if he's using SME 7
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

Offline janet

  • ****
  • 4,798
Re: Can't get external website working
« Reply #10 on: May 16, 2013, 05:49:14 PM »
lpbbear

Quote
Since it is version 7.6 and is reaching EOL in a week or so I may just opt to move it to version 8 and see if it still does not work.

I think you should upgrade to sme8.0
I doubt that it will change what you are experiencing, but hey you never know.
All sme7.x bugs will be closed at EOL date in a week or so, so this close to EOL there is no point lodging a sme7.6 bug report.

If you still experience the same results with sme8.0, then lodge a bug for sme8.0 which can then be investigated.

I did ask you for settings that you use so they could be tried out on another machine & tested from another location.
There can be many reasons why this is not working, one of which could be external.
If you do not want to provide details, then it is difficult to test & determine where the problem lies.

I did not suggest DNS was not working.
I did say it is more likely to be a configuration issue or a conceptual issue, but of course that is yet to be proven.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Re: Can't get external website working
« Reply #11 on: May 16, 2013, 07:28:19 PM »
After a bit more experimentation/testing it appears the issue is coming from Squid and the transparent proxy on the SME Server. It is hanging on to the Internal website and forcing it to internal clients to use the built in SME Server website no matter what the www section of the Configuration/Hostnames and Addresses is set to just as Smeghead described in his post.

I will be moving the server to version 8 sometime in the next couple weeks and retesting. I will update this thread after that. If the SME Server still exhibits the same behavior after that I will reconfigure its position in the network so it is no longer acting as a gateway and transparent proxy, just a mail server.

Thanks

Re: Can't get external website working
« Reply #12 on: May 18, 2013, 04:37:39 AM »
After a bit more experimentation/testing it appears the issue is coming from Squid...

As I speculation on September 26, 2012:

http://forums.contribs.org/index.php/topic,49109.msg244857.html#msg244857

Offline janet

  • ****
  • 4,798
Re: Can't get external website working
« Reply #13 on: May 18, 2013, 08:50:47 AM »
lpbbear

On a sme 8.0 server, I tried changing the Hostname for www (for a virtual domain) to point to a Remote external public IP address for another domain/site.
In Domains panel the virtualdomain was set to Resolve locally.
I also disabled Http proxy in server manager, and ran the post-upgrade & reboot events
Internally behind the sme server (which is the gateway), a workstation web browser accesses www.virtualdomain then it resolves to the external site (I tested this using VPN).
Also if I use lynx at CLI to access www.virtualdomain it will also resolve to the external site (accessed CLI via ssh).

When I use a web browser from an external location (a third location) then if I access http://virtualdomain I get the website that is in the ibay associated with that domain, if I access http://www.virtualdomain, then I resolve to the web site in primary for the main domain on the gateway server hosting the virtual domain, which appears to be what you experience under some conditions.

Not sure why that last part is not working "as expected". Flushed caches on browsers etc, so there may be some sort of a problem or bug internally with sme, although not as extensive as you experience (eg my lynx resolves OK).

A very simple way to forward requests for the virtual site to the external location, is to just put a index.html file in the ibay associated with the domain, and make that index contain a link to the eternal site. I tried that and it works quite OK, without needing to change Hostname or Domain or Http proxy settings.

eg
index.html contents

<HTML>
<HEAD>
<TITLE>Redirecting to the website...</TITLE>
<META HTTP-EQUIV="REFRESH" CONTENT="0; URL=http://www.externaldomain.com">
</HEAD>
</HTML>
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.