Connecting via Hostname

Discussion in 'Installation/Configuration' started by lightnb, Jun 3, 2007.

  1. lightnb

    lightnb New Member

    Currently I'm running Ubuntu Server 7.04 with ISPConfig, configured using This Site's Tutorial.

    I have a DynDNS account with the hostname "bluefish.selfip.com" that points to the static WAN IP address of the DSL modem.

    The modem is set to forward all incoming traffic to the router/firewall (192.168.3.251), which forwards ports 80, 443, 81 and 53 to the server (192.168.3.19).

    If I try to visit the site using it's hostname (http://www.bluefish.selfip.com) from another computer on the network, I get:
    Code:
    Firefox can't find the server at www.bluefish.selfip.com.
    Visiting the server's LAN IP address from within the LAN (http://192.168.5.19) gives the error:
    Code:
    This IP address is shared. For access to the web site which you look for, enter its address instead of its IP.
    If I visit the modems LAN IP address within the network (192.168.1.1), I also get the "This IP address is shared..." error.

    I don't understand where or how I can configure my hostname to refer to different sites on the same server? If they all have the same IP how does it know which site I want to see?
     
  2. Ben

    Ben Active Member Moderator

  3. lightnb

    lightnb New Member

    I created a website called 'test' from within ISPconfig. hostname: www, domain: bluefish.selfip.com

    Is that where I'm supposed to do it at?


    I've added:

    Code:
    68.209.105.89   bluefish.selfip.com
    to the hosts file, but still get a
    error.
     
  4. mtuser

    mtuser New Member

    - router problem
    You can't connect to wan ip from inside. If your router has loopback on funtion please open it. If not, you need to add host file with lan IP


    192.168.3.19 bluefish.selfip.com
     
  5. daveb

    daveb Member

    At dyndns did you check enable wildcard? otherwise www.example.com wont work just example.com
     
  6. lightnb

    lightnb New Member

    I've turned on wild card at DynDNS, and added "192.168.3.19 bluefish.selfip.com" to my /etc/hosts file.

    Router is a WRT54g and does not appear to support loopback.

    I still get a time-out error when loading "http://bluefish.selfip.com/" or "http://www.bluefish.selfip.com/". Can you guys see it from where you are?
     
  7. AceFrahm

    AceFrahm New Member

    WRT54G blocks webservers

    I have a brand new WRT54G version 6, and I believe it blocks all incoming traffic to your webserver, even when you upgrade the firmware and forward port 80. This is the same as the version 2 I replaced. :mad: I think it must be removed from between the server and and ADSL modem. Using verizon, I don't think they block port 80.

    edit: I take it back. Verizon is blocking port 80! The WRT54G might not have been the problem at all. I was only able to discover this with the help of others at IRC freenode #ubuntu. Someone else scanned my IP from the outside with nmap, it did not show port 80. When I nmap'ed on the server machine itself, port 80 was there.

    By the way, someone said the #ubuntu-server IRC is full of helpers, if you have trouble you can go there.

    Does anyone have an automatic method for determining if your ISP is blocking ports (like 80)?
    Shouldn't that be a step in our perfect setup? Otherwise, you have to go get a more expensive "business account"
     
    Last edited: Jun 7, 2007
  8. mtuser

    mtuser New Member

    - ISPconfig

    add Hostname:www
    add Domain:bluefish.selfip.com
    IP Address: your ISPconfig IP - LAN IP


    - host file c:\windows\system32\drivers\etc\hosts
    your ISconfig LAN IP www.bluefish.selfip.com
    your ISconfig LAN IP bluefish.selfip.com

    - your Dyndns option use wildcard.

    - ping your web It should reply your ISPconfig IP

    Then try to access your website.
     
  9. falko

    falko Super Moderator Howtoforge Staff

    Doesn't work for me...
     
  10. lightnb

    lightnb New Member

    Thanks everyone!

    I've got the host name working correctly. I think...

    When I open it in the browser I get "This IP address is shared. For access to the web site which you look for, enter its address instead of its IP."

    I guess what I'm still not understanding is how you make the domain point to a virtual web site, and not the root of all websites which gives the error.

    I'm guessing I need to make more domain names, one for each sub-site? but how do they get assigned to the sub-sites?

    Thanks again for all your help,

    Nick
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess you seletected the wrong IP address for the website. If you are in a NAT enviroment behind a router, you will have to select the private IP for the site and not the public IP.
     
  12. lightnb

    lightnb New Member

    I got it working! Here's what I had to do:

    1. Set the router to receive an IP address from the modem via DHCP
    2. THEN set the modem to do IP passthrough to the modems new IP address
    3. Turn off 'block anonymous internet requests' in the routers firewall
    4. Make sure to use the 'www' prefix otherwise you still get the shared ip address error.

    Thanks again to everyone who's posted suggestions. The help is greatly appreciated. :)
     

Share This Page