Server Behind NAT

Discussion in 'Installation/Configuration' started by Kane, May 6, 2006.

  1. Kane

    Kane New Member

    hi all ,
    first, i have setup a FC5 machine to try out and learn web basics, rather than setting up some programs on my own machine. its a second machine i have.

    i have set up rules from router , and it was working pretty well untill i installed ISPconfig . (i was not using Bind , to make zones and such, was using IP instead)

    my second machine on LAN works pretty well with server . i have registered some zoes and clients via ispconfig. but i have problem with accessing from Net .
    i have entered my router's IP as first DNS server IP , and when i try to connect by typing site address , it resolves the site's ip as the machine's IP behind NAT , like .
    i followed perfect setup guide and assigned second IP for network card , which is same of my router's IP (net side, not lan side ) . and installed ISPconfig from scratch . and used that IP to configure . i have now 2 IPs in ISPconfig , and both of them doesnt work . when i ping or traceroute dns addresses from out of that network , it still resolves the adresses with the machine's lan IP .
    does anyone know why?
  2. falko

    falko Super Moderator Howtoforge Staff


    Connect to what machine?

    Can you describe in more detail what you did?
  3. Herbert

    Herbert New Member

    You have to use a proxy server to see your localhostnames and the domains your running.
    I'm also behaind a NAT and use a proxy server..
  4. Kane

    Kane New Member

    well, ok . i was reading my own post again, and i can say its a little bit complicated :)

    first i installed FC5 , started up and configured apache and ftp . and they worked behind NAT , thats ok .
    then i installed ISPconfig , and tried to configure it. i am creating zones and such , and they work ok when i test it with my PC on the same LAN with the Server .
    but when i use a different PC out of that network , it doesnt work . thats my problem. i entered the DNS server address into the machine i am trying to connect to my network , and it resolves DNS as the server's LAN IP ( etc) , not as my router's IP.
  5. falko

    falko Super Moderator Howtoforge Staff

    I hope you used your public IP address for the DNS records, not your LAN IP address? If you used your LAN IP address, it cannot work from outside your LAN.
  6. Jrdgames

    Jrdgames New Member

    Make sure you are entering your routers ip when trying to access your server from outside of your LAN, if you don't know your routers ip then you can get it by going to from one of the computers inside your LAN.

    Also do you have all neccessary ports forwarded from your router to your server?
  7. Kane

    Kane New Member

    sure . after a couple of more times reinstalling ISPconfig, now i managed to get a reply from server. it seems i made mistakes while installing, by enterin wrong information.
    but now, all of domains and sites i created now get redirected into default site. no matter what i upload, they are all showing the default page, which tells me that apache is perfectly setup, but now i need to upload site into the default directory :eek:
    and one more thing, when i use webftp from inside ISPconfig, and upload files , i get this error : " FTP: Failed to write Array/.htaccess "

    thx for the help. :D
    Last edited: May 10, 2006
  8. falko

    falko Super Moderator Howtoforge Staff

    What's in your Vhosts_ispconfig.conf file?
  9. Kane

    Kane New Member

    hmm, i cant find this file. is should be be in /etc/apache2 , right? there is no directory called apache2 under /etc ... :confused:
    what should i do?

    edit: wrong alert, sorry . here it is (found it under /etc/httpd/conf/vhosts/ ) :

    by the way, i have added some more DNS entries, and they are not in this file, is that normal?
    Last edited: May 16, 2006
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Is "**.***.***.**" this your internal or external IP address?
    Is an registered domain that points to your external IP address?

    DNS is handled by the BIND daemon, not apache. So you wont find any BIND related configuration in your apache configuration file.
  11. Kane

    Kane New Member

    that is my external IP . and is an address i have created via ISP config.

    as i said before, that machine is a standalone pc for educational puposes. while ISPconfig installation , due to i have no DNS rented from somewhere else, i used my external IP as domain name . and other addresses are BIND entries created via ISPconfig.
    Last edited: May 17, 2006
  12. falko

    falko Super Moderator Howtoforge Staff

    The authoritative DNS server for is, and currently is pointing to

    mh1:/var/www/web34/web/empg/web/files/cad_updates# dig
    ; <<>> DiG 9.2.1 <<>>
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56924
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0
    ;                    IN      A
    ;; ANSWER SECTION:             3601    IN      CNAME      3601    IN      CNAME     1738    IN      A
    ;; Query time: 499 msec
    ;; SERVER:
    ;; WHEN: Wed May 17 14:50:22 2006
    ;; MSG SIZE  rcvd: 104
    mh1:/var/www/web34/web/empg/web/files/cad_updates# dig ns
    ; <<>> DiG 9.2.1 <<>> ns
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21868
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 0
    ;                    IN      NS
    ;; ANSWER SECTION:             3601    IN      CNAME      3588    IN      CNAME
    ;; AUTHORITY SECTION:         3601    IN      SOA 2002050701 10001 1801 604801 181
    ;; Query time: 225 msec
    ;; SERVER:
    ;; WHEN: Wed May 17 14:50:35 2006
    ;; MSG SIZE  rcvd: 148
  13. Kane

    Kane New Member

    its just an address i made up . doesnt matter any other names i tried before.
    but now, somehow i managed to work it. i created more (non-taken :) ) DNS entries , but as i said , they are all pointing only one place, the default apache web folder " /var/www/html " . even doesnt matter if i build and share other sites in ISPconfig.
  14. falko

    falko Super Moderator Howtoforge Staff

    Did you follow the "Perfect Setup" from HowtoForge to set up your system?

Share This Page