assigning IP & FTP addresses

Discussion in 'Installation/Configuration' started by swggy, May 12, 2007.

  1. swggy

    swggy New Member

    This is such a simple/basic question that either noone else needs to know the answer, or I can't find the answer on the forums because the search terms I would use are so general - so sorry if you've already answered, and please point me at the original answer.

    I'm trying to do something that requires PHP 5.0 & my internet web host only supports 4.0. So I used the CentOS 5.0 howto to install a webhosting system for myself (behind the router). Even though I'm a complete Linux newbie I got all the way through, and then found the instructions elsewhere to load ISPConfig which worked. Incredible!

    So I went into ISPConfig to create a site that I could access & develop, and this is my issue - what IP address should I use for this new site? and what address do I FTP into? I read through the ISPConfig doc and it didn't specify.

    I tried putting in the server's IP address just to see what happened, and predictably it returned the message
    I'd rather not share - can I create a new address, like It's not on the 'net, so I can use what numbers I want, true? What would I need to do for that? I tried adding it (I've got Webmin loaded) using the network configuration, but it wasn't recognised.

    Further, the site I created in ISPConfig - - wasn't recognized either...I thought I'd at least get a splash screen or an 'under construction' placeholder, but I only get an error.

    Lastly, trying to FTP into the site was also a failure. I tried various configurations of addresses -,,,,, etc - but nothing worked.

    Thanks for any help...
  2. iam8up

    iam8up New Member

    I'm not familiar with ISPConfig, but the first thing I thought when I read that error is that it is using virtual hosts. Open up a prompt and ping those different hosts -,, - and post if those resolve to this

    What I believe is happening is the IP is not set to a virtual host, while those different hosts ( is, but your DNS server is not resolving them.

    I'm betting anything you're on a Linksys router using, the Linksys, as a dnsmasq. Use nslookup to see if your CentOS 5 box is running named and if so, set your DHCP server in your Linksys to use it for DNS.
  3. swggy

    swggy New Member

    Well, I have your answer, but I'm no furtherer forard ...

    1. yes, I'm behind a Linksys router - WRT54G.
    2. When I installed CentOS I named it ''.
    3. I can't see anywhere in Linksys to tell it to use the server for DNS, but
    I've turned off DHCP there.
    4. I've pinged the various hosts and get the following from my Windows box:
    Ping request could not find host Please check the name and try again.
    Pinging with 32 bytes of data:
    Reply from bytes=32 time<1ms TTL=64
    Reply from bytes=32 time<1ms TTL=64
    Reply from bytes=32 time<1ms TTL=64
    Reply from bytes=32 time<1ms TTL=64
    Ping statistics for
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 0ms, Maximum = 0ms, Average = 0ms
    Ping request could not find host Please check the name and try again.
    Ping request could not find host Please check the name and try again.
    and this from the server using PuTTY:
    [[email protected] ~]# ping
    PING ( 56(84) bytes of data.
    From ( icmp_seq=1 Destination Host Unreachable
    From ( icmp_seq=2 Destination Host Unreachable
    From ( icmp_seq=3 Destination Host Unreachable
    --- ping statistics ---
    6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5001ms
    , pipe 3
    [[email protected] ~]# ping
    PING ( 56(84) bytes of data.
    64 bytes from icmp_seq=1 ttl=64 time=0.081 ms
    64 bytes from icmp_seq=2 ttl=64 time=0.042 ms
    64 bytes from icmp_seq=3 ttl=64 time=0.041 ms
    64 bytes from icmp_seq=4 ttl=64 time=0.041 ms
    --- ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 2999ms
    rtt min/avg/max/mdev = 0.041/0.051/0.081/0.017 ms
    [[email protected] ~]# ping
    ping: unknown host
    [[email protected] ~]# ping
    ping: unknown host
    So ... how does one go about setting up a new ip address (in this case and assigning it to &

  4. iam8up

    iam8up New Member

    You turned off DHCP on your Linksys? What is offering you DHCP? Or are you setting your IP addresses all statically?

    Do an ipconfig /all and paste that here. This will help greatly. What you've said proved my theory. Your hosts file nor DNS servers have those records for the different domains & subdomains. Once you get this issue resolved I'm betting that it will fix your "unable to FTP" problems.

    Those different hostnames, as far as your Windows box is concerned, are non-existant, which is why it says "could not find host". Again, use nslookup and see if your CentOS 5 box is running named or whatever DNS server.
  5. Leszek

    Leszek Member

    First of all in my opinion You don't need ISPConfig just to test php scripts.You can do it with a "simple" LAMP solution with an ftp server.

    You should use Your server's IP address for this site and the same address or domain name for ftp connections.
    You have typed the server's IP address in Your browser and saw a normal page saying that You can view the sites on the server by entering their domain names.This is because ISPConfig uses name based virtual hosts on Apache.
    If You enter the server's IP address with the port number specified You should connect to the ftp server,ex. but I recommend using a typical and more convenient ftp client.Then You won't have to type the port number.

    You see that the IP is shared because virtual hosts can provide lots of sites using only one IP so You don't have to change anything.

    To use addresses like to work You need a domain name or some modifications in Linux's /etc/hosts file and C:\SYSTEM\system32\drivers\etc for Windows XP.If You want to let everyone see Your site on the Internet the server will need a public IP address and port forwarding configured on Your router (if the server is on a LAN).Next thing You would need is a domain name.It's records can be configured on a dns server so that You can have addresses pointing to certain services on the server like or etc.
    Last edited: May 13, 2007
  6. swggy

    swggy New Member

    Thenks for the response, iam8up.

    Remember, I'm a complete newbie, but my interpretation of your statement
    was that I should change something in the DHCP setting on the router. The only thing I can see to do here is to turn it off (although I turned it back on after I replied to you). And yes, I'm setting IP addresses statically - that is, I put the IP address into the server when I built it, and can see the address doesn't (appear) to change. This I presume is because the LAN cable is plugged into the back of the router, and the router always assigns the same addresses to the hardwired ports.

    'ipconfig' is not recognised by bash, so I assume you meant run it on the DOS command under Windows:
    Microsoft(R) Windows DOS
    (C)Copyright Microsoft Corp 1990-2001.
    C:\DOCUME~1\SWG>ipconfig /all
    Windows IP Configuration
            Host Name . . . . . . . . . . . . : office
            Primary Dns Suffix  . . . . . . . :
            Node Type . . . . . . . . . . . . : Unknown
            IP Routing Enabled. . . . . . . . : No
            WINS Proxy Enabled. . . . . . . . : No
            DNS Suffix Search List. . . . . . :
    Ethernet adapter Local Area Connection:
            Connection-specific DNS Suffix  . :
            Description . . . . . . . . . . . : VIA Rhine II Fast Ethernet Adapter
            Physical Address. . . . . . . . . : 00-16-EC-C5-69-EE
            Dhcp Enabled. . . . . . . . . . . : Yes
            Autoconfiguration Enabled . . . . : Yes
            IP Address. . . . . . . . . . . . :
            Subnet Mask . . . . . . . . . . . :
            Default Gateway . . . . . . . . . :
            DHCP Server . . . . . . . . . . . :
            DNS Servers . . . . . . . . . . . :
            Lease Obtained. . . . . . . . . . : Saturday, May 12, 2007 3:10:26 AM
            Lease Expires . . . . . . . . . . : Sunday, May 13, 2007 3:10:26 AM
    Running nslookup on Windows I get
    *** Can't find server name for address Non-existent domain
    *** Default servers are not available
    Server:  UnKnown
    *** UnKnown can't find Non-existent domain
    and it gives the same response for 100 (the Windows PC).

    Running it on bash I get
    [[email protected] ~]# nslookup
    ** server can't find NXDOMAIN
    [[email protected] ~]# nslookup
    ** server can't find NXDOMAIN
    [[email protected] ~]#
    There has to be something incredibly simple that I've missed - there always is. Thanks again...
  7. tristanlee85

    tristanlee85 New Member

    What you do is when creating the site, when you get to the drop-down menu to choose the IP address to use, make sure it's your internal (server's) IP).


    Then, go to the DNS manager, click on the domain, and click the "Records" tab. Your hosts listed there will have your internal IP (192.168.1.* or whatever). You must click on the IP address, and then change the A record IP address to your WAN address. That way, when people go to your site, the A record will point to your server, and once it gets to the server, it knows to use your internal IP address.

  8. iam8up

    iam8up New Member

    I should've been more specific...

    DNS is how you turn your into Your DHCP server is as is you gateway, so you obviously have not turned DHCP off on your Linksys. The weird thing is, your DHCP server is offering as your one and only DNS server - I don't see how you could be resolving names. What kind of a device is supply your Linksys with Internet? What ISP do you have?

    Default Server:  [I]something[/I]
    > server [Your Linux box]
    *** [I]something[/I]
    Again, I think you need to change your Linksys DHCP server to offer for a DNS server for your records. Besides this, you can disable DHCP on your Linksys and install/configure DHCP on your Linux box.

    If you don't know how to do this let me know, and in the meantime do this...

    Start -> Run -> notepad %SYSTEMROOT%\system32\drivers\etc\hosts

    At the bottom type...

    Then save and exit. At this point test your ftp - should work if I'm right. Let me know.
  9. iam8up

    iam8up New Member

    This would not do anything for him. His Linksys is not telling his Windows box to look at his Linux box for DNS.
  10. swggy

    swggy New Member

    Got it!

    OK I got it! I've gone back into ISPConfig and deleted the swggy site (and flushed the trash) and then added it from scratch.

    I could then access in firefox if I run the browser on KDE on the server, but couldn't access it from Windows - pretty conclusive evidence that you were right about the XP setup not being able to find the name.

    I could also now ftp into from the Linux box - oddly enough, by putting '' as the target, rather that '' which doesn't work at all. I couldn't ftp from the Windows box.

    Once I saw your latest on putting the domain with 'ftp' into the hosts file & did that, everything started working fine. Staggeringly simple as I knew it had to be.

    And since (I'm theorizing) the host file is checked before DNS lookup, that's why it's now working. I'm left with the question of how to add swggy to the BIND DNS server, but I don't need that for this project.

    So now I'm down to one problem that seems as if it should be easily fixable. When I try to access the pages with it's looking for files in this directory:


    ... and in fact displays the file /var/www/web6/web/index.html as my homepage, including the line "Welcome to!" hardcoded.

    But when I upload files with ftp, they go into this directory:


    Now I know that Apache uses /var/www as the default base for users. ISPConfig adds the /web6 (because this is the 6th time I've built the setup in ISPConf, I guess). But ISPConf requires that a username is created and inserts the /user/web6_swggy string into the directory path.

    So the question now is - how to reconcile the 2 paths?
  11. swggy

    swggy New Member

    Well, I fixed that one, but I may have done something unwise in the process.

    I reasoned thusly: The ftp location


    seemed correct, in that it was set up for multiple possible websites/accounts; the www location


    seemed as if it would cause a collision - every website in web6 would put its files in the same directory. So I concluded that the PROFTPD server's files were correct, and that Apache's were wrong - (not that Apache itself was wrong, just that ISPConfig's adjustment to it was wrong).

    So I went into Webmin's Apache server interface and found the virtual server for - which said that the document root was indeed /var/www/web6/web. I changed it to be the same as the ftp directory, restarted Apache and got my web page.

    The thing that has me worried about this is that I think it unlikely that ISPConfig's interface to Apache is wrong, whilst I think it highly likely that I've hosed something somewhere. Further, any time I regenerate the entries in ISPConfig, the index will bump up and I'll have to go back into Apache and correct it. Finally, I'm aware that the thought of making any adjustments to Apache config files as a newbie is verging on lunacy.

    So my question from earlier remains ... what is the correct way to reconcile those two paths?

    Thanks for your help ...
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    As you guessed already, ISPConfig is configuring everything for you without the need to changing any configuration file or useing webmin :)

    You just missed to enable the "administrator" checkbox for the user that shall be the admin of the website. ISPconfig changes the home directory of this user then to be the root directory of the website.
  13. swggy

    swggy New Member

    That was it, thanks - I'm in business.

Share This Page