Access via external IP works but website name doesn't

Discussion in 'General' started by soch, Sep 14, 2009.

  1. soch

    soch New Member


    Yes, that is one of the required steps as per the instructions. And thanks for letting me know that bind9 was running. I must have mistakenly installed it when things didn't work in the first attempt. I will remove the package.

    But the problem I am having is that the nameserver is not responding. intodns.com still gives the same error for my website:
    HTML:
    "Mismatched NS records  	WARNING: One or more of your nameservers did not return any of your NS records.
    Error 	DNS servers responded 	ERROR: One or more of your nameservers did not respond:
    The ones that did not responded are:w.x.y.z - external IP address of my router"

    Code:
    root@server1:~# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State                                                                                                    PID/Program name
    tcp        0      0 server1.domainXYZ:10024 *:*                     LISTEN                                                                                                   2682/amavisd (maste
    tcp        0      0 server1.domainXYZ:10025 *:*                     LISTEN                                                                                                   3501/master
    tcp        0      0 *:mysql                 *:*                     LISTEN                                                                                                   2759/mysqld
    tcp        0      0 server1.domainXYZ:spamd *:*                     LISTEN                                                                                                   2841/spamd.pid
    tcp        0      0 *:sunrpc                *:*                     LISTEN                                                                                                   2197/portmap
    tcp        0      0 *:http-alt              *:*                     LISTEN                                                                                                   4016/apache2
    tcp        0      0 *:www                   *:*                     LISTEN                                                                                                   4016/apache2
    tcp        0      0 *:1008                  *:*                     LISTEN                                                                                                   2527/ypbind
    tcp        0      0 *:ftp                   *:*                     LISTEN                                                                                                   3517/pure-ftpd (SER
    tcp        0      0 server1.domainXY:domain *:*                     LISTEN                                                                                                   3426/mydns
    tcp        0      0 server1.domainXY:domain *:*                     LISTEN                                                                                                   3426/mydns
    tcp        0      0 *:ssh                   *:*                     LISTEN                                                                                                   2478/sshd
    tcp        0      0 server1.domainXYZ.c:ipp *:*                     LISTEN                                                                                                   3864/cupsd
    tcp        0      0 *:smtp                  *:*                     LISTEN                                                                                                   3501/master
    tcp        0      0 *:https                 *:*                     LISTEN                                                                                                   4016/apache2
    tcp        0    300 server1.domainXYZ.c:ssh 192.168.1.4:3253        ESTABLISHED                                                                                              5279/0
    tcp6       0      0 [::]:imaps              [::]:*                  LISTEN                                                                                                   3367/couriertcpd
    tcp6       0      0 [::]:pop3s              [::]:*                  LISTEN                                                                                                   3411/couriertcpd
    tcp6       0      0 [::]:pop3               [::]:*                  LISTEN                                                                                                   3386/couriertcpd
    tcp6       0      0 [::]:imap2              [::]:*                  LISTEN                                                                                                   3342/couriertcpd
    tcp6       0      0 [::]:ftp                [::]:*                  LISTEN                                                                                                   3517/pure-ftpd (SER
    tcp6       0      0 localhost:domain        [::]:*                  LISTEN                                                                                                   3426/mydns
    tcp6       0      0 [::]:ssh                [::]:*                  LISTEN                                                                                                   2478/sshd
    tcp6       0      0 localhost:ipp           [::]:*                  LISTEN                                                                                                   3864/cupsd
    root@server1:~# netstat -tap | grep dns
    tcp        0      0 server1.domainXY:domain *:*                     LISTEN                                                                                                   3426/mydns
    tcp        0      0 server1.domainXY:domain *:*                     LISTEN                                                                                                   3426/mydns
    tcp6       0      0 localhost:domain        [::]:*                  LISTEN                                                                                                   3426/mydns
    root@server1:~#
     
    Last edited: Sep 18, 2009
  2. soch

    soch New Member

    Any other suggestions?

    I am stuck here. I tried going over the steps in the howto pages on ubuntu & ispconfig3. But I have the same problem.
     
  3. giftsnake

    giftsnake New Member

    if things dont work out i would restart from scratch.
     
  4. soch

    soch New Member

    This is my second attempt.
     
  5. giftsnake

    giftsnake New Member

    you will have to forward port 53 for the nameserver
     
  6. soch

    soch New Member

    I added port 53 for UPD & TCP. My router port forwarding looks as below:

    HTML:
    Local Host=a.b.c.d 	
    Local Address=a.b.c.d 	
    Network Address =Any 	
    Public IP Address =any	
    
    Protocols 
    HTTPS - TCP Any -> 443
    HTTP - TCP Any -> 80
    HTTP Web Access - TCP Any -> 3127-3128
            TCP Any -> 80-81
            TCP Any -> 8080
            TCP Any -> 8000
            TCP Any -> 8888
    HTTP Secondary - TCP Any -> 8080
    nameserver - TCP 53 -> 53
    nameserver1 - UDP 53 -> 53
    
    Where a.b.c.d is the internal IP address of the ubuntu server running ispconfig.
    
    Still the same problem.
     
  7. Antennipasi

    Antennipasi Member

    What does "dig @localhost domain1.com " show now?
    If it works, then problem could be in /etc/mydns.conf, please show what it says in sections "# GENERAL OPTIONS" and "# ESOTERICA"
     
  8. soch

    soch New Member

    My ISP changed my external IP address. So I had to change the ns1 & ns2 settings on godaddy.com. It will take a day or two to propagate. I also changed all the records in ISPConfig to reflect the new external IP address.

    After adding the port 53 on my router I see better results with dig:
    Code:
    dig @localhost domain1.com
    
    ; <<>> DiG 9.5.1-P2 <<>> @localhost domain1.com
    ; (2 servers found)
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36685
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
    ;; WARNING: recursion requested but not available
    
    ;; QUESTION SECTION:
    ;domain1.com.		IN	A
    
    ;; ANSWER SECTION:
    domain1.com.	86400	IN	A	W.X.Y.Z
    
    ;; AUTHORITY SECTION:
    domain1.com.	86400	IN	NS	ns1.domain1.com.
    domain1.com.	86400	IN	NS	ns2.domain1.com.
    
    ;; ADDITIONAL SECTION:
    ns1.domain1.com.	86400	IN	A	W.X.Y.Z
    ns2.domain1.com.	86400	IN	A	W.X.Y.Z
    
    ;; Query time: 4 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Sun Sep 20 22:05:54 2009
    ;; MSG SIZE  rcvd: 118
    
    


    Now the other problem, that was working earlier, I see is when I use http://internalIPoftheserver, my website loads. But when I use http://externalIPofrouter, it does not load.

    The DNS records are as follows:
    A mail W.X.Y.Z 0
    A ns1 W.X.Y.Z 0
    A ns2 W.X.Y.Z 0
    A domain1.com. W.X.Y.Z 0
    A www W.X.Y.Z 0
    MX domain1.com. mail.domain1.com 10
    NS domain1.com. ns1.domain1.com. 0
    NS domain1.com. ns2.domain1.com. 0

    Note: I had to put dots at the end of ns1.domain1.com under the DATA column. Otherwise dig was reporting it as ns1.doamin1.com.domain1.com.

    Router port forwarding settings:
    ameserver - TCP 53 -> 53
    nameserver1 - UDP 53 -> 53
    HTTP - TCP Any -> 80
    HTTP Web Access - TCP Any -> 3127-3128
    TCP Any -> 80-81
    TCP Any -> 8080
    TCP Any -> 8000
    TCP Any -> 8888
    HTTP Secondary - TCP Any -> 8080
    HTTPS - TCP Any -> 443
    HTTPS Secondary - TCP Any -> 8443
     
    Last edited: Sep 21, 2009
  9. soch

    soch New Member

    # GENERAL OPTIONS

    user = nobody # Run with the permissions of this user
    group = nogroup # Run with the permissions of this group
    listen = * # Listen on these addresses ('*' for all)
    no-listen = # Do not listen on these addresses

    # ESOTERICA

    log = LOG_DAEMON # Facility to use for program output (LOG_*/stdout/stderr)
    pidfile = /var/run/mydns.pid # Path to PID file
    timeout = 120 # Number of seconds after which queries time out
    multicpu = 1 # Number of CPUs installed on your system
    recursive = # Location of recursive resolver
    allow-axfr = yes # Should AXFR be enabled?
    allow-tcp = yes # Should TCP be enabled?
    allow-update = no # Should DNS UPDATE be enabled?
    ignore-minimum = no # Ignore minimum TTL for zone?
    soa-table = dns_soa # Name of table containing SOA records
    rr-table = dns_rr # Name of table containing RR data
    soa-where = server_id = 1 # Extra WHERE clause for SOA queries
    rr-where = server_id = 1 # Extra WHERE clause for RR queries
    use-soa-active = yes # To fix bug 295 where active or inactive status is ignored.
    use-rr-active = yes# To fix bug 295 where active or inactive status is ignored.
     
  10. Antennipasi

    Antennipasi Member

    mydns.conf seems ok.

    Go to http://networking.ringofsaturn.com/Tools/dig.php

    and enter "@externalIPofrouter domain1.com" ,does it answer?

    Is your workstation behind same router? If so, can you ssh to server with externalIPofrouter? Forward port 22 before testing.

    If you can do that, maybe problem is in your workstations name resolution. Try to edit host-file and put "externalIPofrouter domain1.com" there.
     
  11. soch

    soch New Member

    output of above website's dig:
    ; (1 server found)
    ;; global options: printcmd
    ;; connection timed out; no servers could be reached

    Yes, it's the same router. No I am unable to ssh, it times out. I did fwd port 22. I put a line in /etc/hosts file.
     
  12. giftsnake

    giftsnake New Member

    what you have:
    Router port forwarding settings:
    ameserver - TCP 53 -> 53
    nameserver1 - UDP 53 -> 53
    HTTP - TCP Any -> 80
    HTTP Web Access - TCP Any -> 3127-3128
    TCP Any -> 80-81
    TCP Any -> 8080
    TCP Any -> 8000
    TCP Any -> 8888
    HTTP Secondary - TCP Any -> 8080
    HTTPS - TCP Any -> 443
    HTTPS Secondary - TCP Any -> 8443


    what you need:
    HTTP - TCP: 80 -> 80
    HTTPS - TCP 443 -> 443
    HTTP - TCP: 8080 -> 8080
    HTTPS - TCP: 8443 -> 8443
    SSH - TCP: 22 -> 22
    NAMESERVER - TCP: 53 -> 53

    NOTHING else
    all the "any -> xyz" forwardings do bad things!
     
  13. soch

    soch New Member

    Here's my latest router settings:
    nameserver - TCP 53 -> 53
    http - TCP 80 -> 80
    TCP 443 -> 443
    TCP 8080 -> 8080
    TCP 8443 -> 8443
    TCP 22 -> 22
     
  14. Antennipasi

    Antennipasi Member

    Is it working now? Clearly previous external dig-tets showed your router did not let outer world in.
    Althought UDP for nameserver is not strictly needed, i would recommend to enable it too.
     
  15. soch

    soch New Member

    No, its not working. When I put external IP it takes me to my router admin login page.

    Added UDP for port 53.

    External dig:
    Output of dig W.X.Y.Z

    Code:
    ; <<>> DiG 9.4.3-P2 <<>> W.X.Y.Z
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 42185
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;W.X.Y.Z.			IN	A
    
    ;; AUTHORITY SECTION:
    .			10740	IN	SOA	A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2009092101 1800 900 604800 86400
    ;; Query time: 0 msec
    ;; SERVER: 71.252.219.43#53(71.252.219.43)
    ;; WHEN: Mon Sep 21 17:41:48 2009
    ;; MSG SIZE  rcvd: 104
    
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe your internet access provider is blockin these ports?
     
  17. soch

    soch New Member

    I have Verizon FiOS. Has any one had luck with this service?

    --Edit: Looks like verizon fios blocks port 80. I will try to use no-ip.

    Can´t figure out how to do port 80 redirect in godaddy.com :-( The no-ip setup required me to purchase the domain name from no-ip.com !!!

    Changed the default port 80 to 8088 under /usr/local/ispconfig/server/conf# vi vhost.conf.master
    ---EDIT: no I didn´t have to. I am forwarding WAN 8088 to LAN 80 in my router.

    Ended up using dyndns.com free dns service. That part worked. The long website name (domain1.doesntexit.com) translates to http://W.X.Y.Z:60111, where W.X.Y.Z is the external IP of my router.

    The part still not working is the access from outside to the internally hosted website (via ispconfig). I wonder if Verizon blocks all outside http access unless business account is purchased. The port forward looks like as below in my router:
    web - TCP 60111 -> 80
    nameserver - TCP 53 -> 53
    My browser complains with ¨can't establish a connection to the server at W.X.Y.Z:60111¨
     
    Last edited: Sep 23, 2009
  18. soch

    soch New Member

    Problem solved!!!

    Finally, found the solution.

    It was a problem in the Verizon Westell 9100 router.

    I had to put the webserver in the DMZ zone fully exposed to the internet. Port forwarding doesn't work.

    Now when I type http://domain1.com it takes me to my webpage from outside. But when I type http://www.domain1.com it gives me a generic ISPConfig screen. I will try to put the snapshot. Looks like it is reading the index.html instead of index.php.
     

    Attached Files:

    • test.jpg
      test.jpg
      File size:
      33.4 KB
      Views:
      120
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Just deelete the index.html file when ypou upload your website content.
     
  20. soch

    soch New Member

    Thats the first thing I did. I have my own index.php & related files & Drupal pages under /var/www/clients/client0/web1. I will investigate more and see what the problem is.

    Q: Where are the index pages & sub-directories supposed to be? In /var/www/clients/client0/web1 or under /var/www/clients/client0/web1/web folder? Where in ISPConfig is this specified?
     
    Last edited: Sep 24, 2009

Share This Page