Koozali.org: home of the SME Server

Configuration of server only SME with dynamic DNS for internet access to i-bays

Offline ahartwig

  • 4
  • +0/-0
I have a ADSL connection to the internet with DHCP assigned dynamic address. The modem routes to a firewall/router with the SME system (server only) in a DMZ. The ADSL modem does port forwarding on port 25 (SMTP) and 80 (HTTP) to the SME system. I run ddclient on the SME system to update my dynamic IP address on dyndns.com.

The firewall router acts as DNS server for my "local" network which I have called example.org.

The review configuration web page shows primary domain example.org and virtual domain xxx.dyndns.org

I have created an i-bay test to be accessed from the internet and local network.

I can access the test i-bay locally by http://sme.example.org/test but if I attempt to access the test i-bay from the internet (lynx from a system to which I've telnet'd) I get The requested URL /test was not found on this server.

I've looked in /etc/httpd/conf/httpd.conf and see the following fragment:

Quote

<VirtualHost 0.0.0.0:80>

    ServerName example.org
    ServerAlias ftp.example.org mail.example.org proxy.example.org sme.example.org wpad.example.org www.example.org

    DocumentRoot         /home/e-smith/files/ibays/Primary/html
    ScriptAlias /cgi-bin /home/e-smith/files/ibays/Primary/cgi-bin
    Alias       /files   /home/e-smith/files/ibays/Primary/files

    # test ibay (just 4 testing)

    ScriptAlias /test/cgi-bin /home/e-smith/files/ibays/test/cgi-bin
    Alias       /test/files   /home/e-smith/files/ibays/test/files
    Alias       /test        /home/e-smith/files/ibays/test/html


but in the fragment for server name xxx.dyndns.org there are no Alias entries for /test

It appears i-bays are only accessible from the internet IF they are on the primary domain. Correct? Is that intended behaviour?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Correct? Is that intended behaviour?
AFAIK yes, but you can assign a ibay to a virtual domain.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline ahartwig

  • 4
  • +0/-0
AFAIK yes, but you can assign a ibay to a virtual domain.

Yes, but it seems there is a one to one association between ibays and virtual domains.

Hence, if I have an ibay test I can access it as http://sme.example.org/test (because the host name is configured as sme.example.org) but the only way to access it from the internet is to create a virtual domain (e.g. xxx.dyndns.org) and associate that with the ibay in which case I would access it as http://xxx.dyndns.org. For every additional ibay I want to access from the internet I need to create an additional virtual domain. This is easy enough if I register with dyndns.com because they provide optional wildcard domain names but other free DNS providers (e.g. no-ip.com) don't provide wildcard domain names.

For my purposes I suspect I can get what I want by changing the configured name of my system from sme.example.org to xxx.dyndns.org (or xxx.no-ip.com).

I've been through the documentation (Administration Manual) and can't find anywhere that calls out the fact that ibays can be accessed by http://hostname/ibay-name only if hostname is the configured local hostname and NOT if hostname is an additional "self" hostname configured through the Domains and Hostnames and addresses panels in the web GUI.

If the current behaviour is to be preserved then I think it would be useful for the Hostnames and addresses panel to mark the "primary" hostname specially since the the current display gives the impression that all the self hostnames are equivalent, but they are not equivalent when it comes to web access to ibays.

I came to my current configuration with dual names by initially setting up a server only system on my locally network. Then later, when I wanted to access it from the internet, I added another domain and self hostname for the internet access rather than go through the console configuration dialogue again to change the local hostname and domain.


Offline janet

  • *****
  • 4,812
  • +0/-0
ahartwig

I'm not sure I fully follow what you want to do.

Rather than pointing your secondary virtual domain at a specific ibay, you can just point the virtual domain at the primary ibay.

That way the virtualdomain.com will resolve to the content in the primary ibay. You can then access your ibay using
virtualdomain.com/ibayname

There is another trick you can do when a specific name is already used for an existing user, group or pseudonym, where you create subfolders in the ..../primary/html folder and then create a index file in those folders that redirect to wherever you want eg an ibay.

Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline ahartwig

  • 4
  • +0/-0
Rather than pointing your secondary virtual domain at a specific ibay, you can just point the virtual domain at the primary ibay.

OK, I've done that in the Domains panel of the web GUI:

xxx.dyndns.org is "virtual domain" associated with Primary ibay.
example.org is the domain configured during console configuration and sme is the hostname configured during console configuration.

I've created an additional ibay test. I can access test by http://sme.example.org/test. I can't access test by http://xxx.dyndns.org/test (the browser reports The requested URL /test was not found on this server.).

Maybe I didn't understand your suggestion.



Offline janet

  • *****
  • 4,812
  • +0/-0
ahartwig

Quote
I can't access test by http://xxx.dyndns.org/test (the browser reports The requested URL /test was not found on this server.).

Yes that behaviour is correct, sorry to mislead you.




Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • *****
  • 4,812
  • +0/-0
ahartwig

The simplest approach is to rename your main domain using the server console, then access your ibays using the maindomain/ibayname URL as desired.

All settings will be retained, so it is safe to do.

Alternatively point your main domain at an ibay (rather than primary), and move your other ibay content into subfolders in that main ibay.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.