IP works servername doesnt? (debian 5 tutorial help)

Discussion in 'Installation/Configuration' started by ggohdin, Mar 15, 2009.

  1. ggohdin

    ggohdin New Member

    Hi, great tutorial btw.

    Everything installed pretty well. only issue I have is when I type my Local IP ( for my server into my browser it shows "it works" however if i use the servers name nothing happens.

    "localhost" and "localhost -f" show correct responces for the server name.

    When I looked at the /etc/resolv.conf file it had "nameserver" should that be "" for my server address?

    netstat -tap is displaying this:

    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 localhost.localdo:10024 *:*                     LISTEN      20481/amavisd (mast
    tcp        0      0 localhost.localdo:10025 *:*                     LISTEN      20407/master
    tcp        0      0 *:mysql                 *:*                     LISTEN      20231/mysqld
    tcp        0      0 *:sunrpc                *:*                     LISTEN      1907/portmap
    tcp        0      0 server1.agama.co:domain *:*                     LISTEN      21205/mydns
    tcp        0      0 localhost.locald:domain *:*                     LISTEN      21205/mydns
    tcp        0      0 *:ftp                   *:*                     LISTEN      21199/pure-ftpd (SE
    tcp        0      0 *:ssh                   *:*                     LISTEN      21612/sshd
    tcp        0      0 localhost.localdoma:918 *:*                     LISTEN      2438/famd
    tcp        0      0 *:39671                 *:*                     LISTEN      1918/rpc.statd
    tcp        0      0 *:smtp                  *:*                     LISTEN      20407/master
    tcp        0    148 server1.agama.com:ssh        ESTABLISHED 2528/sshd: administ
    tcp6       0      0 [::]:imaps              [::]:*                  LISTEN      21122/couriertcpd
    tcp6       0      0 [::]:pop3s              [::]:*                  LISTEN      21150/couriertcpd
    tcp6       0      0 [::]:pop3               [::]:*                  LISTEN      21133/couriertcpd
    tcp6       0      0 [::]:imap2              [::]:*                  LISTEN      21100/couriertcpd
    tcp6       0      0 [::]:http-alt           [::]:*                  LISTEN      21182/apache2
    tcp6       0      0 [::]:www                [::]:*                  LISTEN      21182/apache2
    tcp6       0      0 localhost:domain        [::]:*                  LISTEN      21205/mydns
    tcp6       0      0 [::]:ftp                [::]:*                  LISTEN      21199/pure-ftpd (SE
    tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      21612/sshd
    tcp6       0      0 [::]:https              [::]:*                  LISTEN      21182/apache2
    Is the part "localhost.localdo:10024 ", "localhost.localdo:10025" correct? or should I swap localhost around with localhost.localdomain in the /etc/hosts file? which would result in:

    tcp        0      0 localhost:10024         *:*                     LISTEN      2201/amavisd (maste
    tcp        0      0 localhost:10025         *:*                     LISTEN      2832/master
    Also this is the output of "dig `hostname`"
    ; <<>> DiG 9.5.1-P1 <<>> server1.agama.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 50997
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    ;server1.agama.com.             IN      A
    agama.com.              8401    IN      SOA     ns1.gldn.net. dnsmaster.gldn.net. 2005122700 10800 3600 3600000 86400
    ;; Query time: 52 msec
    ;; SERVER:
    ;; WHEN: Sun Mar 15 15:27:39 2009
    ;; MSG SIZE  rcvd: 93
    output of "nslookup server1.agama.com"
    ** server can't find server1.agama.com: NXDOMAIN
    so my questions are:

    Is there something wrong with the /etc/resolv.conf ip address?

    something wrong with the /etc/hosts file, should I swap it back or leave it?

    Is it possibly my modem/router (port forwarding is on)?

    If so should I use DNS in my modem/router?

    Thank you for your time

    Last edited: Mar 15, 2009
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You will have to add a line for your server hostname in the hosts file of the workstation that you use to access the server too. This works also on windows.
  3. ggohdin

    ggohdin New Member

    so there wasnt anything wrong after all?:rolleyes:

    Well I hope not, I get "SERVER:" when I dig "hostname" though, shouldnt it be my servers ip address that I have assigned (192.1681.14) in my /etc/network/interfaces and /etc/hosts file?

    Also should my localhost be displaying the ip (which is my gateway)
    Name:   localhost
    I also get a message like this when I dig `server1`

    ** server can't find server1: NXDOMAIN
    Is any of that to worrie about?
  4. falko

    falko Super Moderator ISPConfig Developer is the nameserver that you are querying. It should be listed in /etc/resolv.conf.
  5. ggohdin

    ggohdin New Member

    Thanks I started a new topic on another problem I am having

Share This Page