Need help ISPConfig and NAT weird domain problems

Discussion in 'Installation/Configuration' started by nightshade2109, Nov 15, 2006.

  1. nightshade2109

    nightshade2109 New Member

    hi i need some help i have ispconfig installed perfectly without any hickups..
    but im having weird problems i have 2 connections one being dsl and the other being cdma when i try access a vhost on my site from the dsl on mysite.co.za it connects but times-out, but then i cant access it at all on www.mysite.co.za if i try ping that address it times-out but it still shows my external ip, but if i try ping mysite.co.za it gets a reply from my external ip, but then i cant access it through a web browser.

    i think it might have something to do with nat ,how my ispconfig is setup and my firewall because my server has an internal ip address and any request to my external ip goes through nat to my internal one.

    any ideas the other thing is if i change the ispconfig's ip's to my external ip everything works, but www.mysite.co.za or mysite.co.za goes to /var/www and the vhosts stop working. any idea? maybe i need to setup my bind config for nat or something im pretty new to linux so if anyone could help i would appreciate it thanks in advance :)
     
  2. edge

    edge Active Member Moderator

    It's working fine for me..

    I guess you are trying to access the site within you LAN.
    If so, add the server IP and domain to the hosts file of the PC that you are using to view the site with
     
    Last edited: Nov 15, 2006
  3. nightshade2109

    nightshade2109 New Member

    nope im not using lan

    nope im not using lan ive been testing this over 2 different connections
     
  4. nightshade2109

    nightshade2109 New Member

    is this correct ?

    /etc/bind/pri.exactweb.co.za

    TTL 86400
    @ IN SOA ct5.ctni.co.za. admin.exactweb.co.za. (
    2006111512 ; serial, todays date + todays serial #
    28800 ; refresh, seconds
    7200 ; retry, seconds
    604800 ; expire, seconds
    86400 ) ; minimum, seconds
    ;
    NS ct5.ctni.co.za. ; Inet Address of name ser$
    NS ns0.xname.org. ; Inet Address of name serv$
    ;

    mail MX 10 exactweb.co.za.

    exactweb.co.za. A 196.15.247.77
    www A 196.15.247.77
    mail A 196.15.247.77


    /etc/bind/zones/master_ct5.ctni.co.za

    $TTL 3D
    @ IN SOA ct5.ctni.co.za. hostmaster.ct5.ctni.co.za. (
    199802151 ; serial, todays date + todays serial #
    8H ; refresh, seconds
    2H ; retry, seconds
    4W ; expire, seconds
    1D ) ; minimum, seconds
    ;
    TXT "ct5.ctni.co.za, serving YOUR domain :)"
    NS ct5.ctni.co.za ; Inet Address of name server
    NS ns0.xname.org
    MX 10 mail ; Primary Mail Exchanger
    localhost A 127.0.0.1
    ns1 A 196.15.247.77
    ns2 A 195.234.42.1
    www CNAME ct5
    ftp CNAME ct5
    mail CNAME ct5

    -------------------------------------------------------------------
    /nano/etc/apache2/Vhosts_ispconfig.cond

    ###################################
    #
    # ISPConfig vHost Configuration File
    # Version 1.0
    #
    ###################################
    #
    NameVirtualHost 196.15.247.77:80
    <VirtualHost 196.15.247.77:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: www.exactweb.co.za:80
    ######################################
    #
    #
    <VirtualHost 196.15.247.77:80>
    ServerName www.exactweb.co.za:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web1/web
    ServerAlias exactweb.co.za
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 $
    ScriptAlias /cgi-bin/ /var/www/web1/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web1/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    <Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php3>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php4>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php5>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    php_admin_flag safe_mode Off
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    AddType application/vnd.wap.wmlscriptc .wmlsc .wsc
    AddType text/vnd.wap.wml .wml
    AddType text/vnd.wap.wmlscript .ws .wmlscript
    AddType text/vnd.wap.wmlscript .ws .wmlscript
    AddType image/vnd.wap.wbmp .wbmp
    Alias /error/ "/var/www/web1/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html
    ErrorDocument 401 /error/authorizationRequired.html
    ErrorDocument 403 /error/forbidden.html
    ErrorDocument 404 /error/fileNotFound.html
    ErrorDocument 405 /error/methodNotAllowed.html
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
    </VirtualHost>
     
  5. edge

    edge Active Member Moderator

    images removed as requested..
     
    Last edited: Nov 15, 2006
  6. nightshade2109

    nightshade2109 New Member

    its all working

    thanks found the problem
     
  7. edge

    edge Active Member Moderator

    Maybe you can post the fix here, so that other users can learn from it?
     
  8. nightshade2109

    nightshade2109 New Member

    post fix

    sure thing i will post the fix but would you mind removing the pics and links to my site i dont want anyone to see the address and what it looks like :)
     
  9. nightshade2109

    nightshade2109 New Member

  10. nightshade2109

    nightshade2109 New Member

    ok how i solved it

    ok first of all im behind a firewall and im using NAT to translate my internal ip 192.168.111.77 address to my external one 196.15.247.77 now in ispconfig --> management --> settings i set this ip address to my internal one and all other ips like DNS records etc to my external one...

    now another problem it seems is that when i ping exactweb.co.za it gets the ip address 192.168.111.77 but times out because im not on the internal network and if i ping www.exacthost.co.za it comes back with the ip address 196.15.247.77 and reply's if there a fix for this issue anywhere on the forums? or does anyone know howto fix it?
     
    Last edited: Nov 15, 2006
  11. nightshade2109

    nightshade2109 New Member

    sorry correction

    i think there needs to be a fix to be able to change the ip address of the co-domains if there a place to do this manually?
     
    Last edited: Nov 15, 2006
  12. falko

    falko Super Moderator Howtoforge Staff

    You must always use the IP addresses in ISPConfig that you see when you run
    Code:
    ifconfig
    on your system, so if it shows local IP addresses you must use these local IP addresses in ISPConfig, otherwise your name-based vhosts won't work.
     

Share This Page