Add new domain manually

Discussion in 'General' started by klemen, May 6, 2017.

  1. klemen

    klemen New Member

    Hello,
    I can't access ISPConfig from remote (firewall) but I have ssh access to system and urgently need to add new domain (first) to DNS.
    Currently I have on the system only one domain on witch the system is working.
    So the question is how to add new domain from SSH?
    That's the files in /etc/bind:
    Code:
    root@raspberrypi:/etc/bind# ll
    total 64
    -rw-r--r-- 1 root root 2389 Feb 18  2015 bind.keys
    -rw-r--r-- 1 root root  237 Feb 18  2015 db.0
    -rw-r--r-- 1 root root  271 Feb 18  2015 db.127
    -rw-r--r-- 1 root root  237 Feb 18  2015 db.255
    -rw-r--r-- 1 root root  353 Feb 18  2015 db.empty
    -rw-r--r-- 1 root root  270 Feb 18  2015 db.local
    -rw-r--r-- 1 root root 3048 Feb 18  2015 db.root
    -rw-r--r-- 1 root bind  463 Dec 14 18:20 named.conf
    -rw-r--r-- 1 root bind  490 Feb 18  2015 named.conf.default-zones
    -rw-r--r-- 1 root bind  242 May  6 10:33 named.conf.local
    -rw-r--r-- 1 root bind  914 Oct  5  2016 named.conf.options
    -rw-r--r-- 1 root bind  502 May  5 22:27 pri.newdomain.com
    -rw-r--r-- 1 root bind 1020 May  6 10:41 pri.domain.com
    -rw-r----- 1 bind bind   77 Apr 29  2015 rndc.key
    d-ws-w--wT 2 root bind 4096 Apr 29  2015 slave
    -rw-r--r-- 1 root root 1317 Feb 18  2015 zones.rfc1918
    root@raspberrypi:/etc/bind# 
    I added pri.newdomain.com with content:
    Code:
    $TTL        3600
    @       IN      SOA     ns1.domain.com. xxxx.gmail.com. (
                            2015070308       ; serial, todays date + todays serial #
                            7200              ; refresh, seconds
                            540              ; retry, seconds
                            604800              ; expire, seconds
                            86400 )            ; minimum, seconds
    ;
    
    newdomain.com.     3600   A        externaIP
    www                   3600   A        externaIP
    
    And edit named.conf.local
    Code:
    zone "domain.com" {
            type master;
            allow-transfer {none;};
            file "/etc/bind/pri.domain.com";
    };
    zone "newdomain.com" {
            type master;
            allow-transfer {none;};
            file "/etc/bind/newdomain.com";
    };
    
    But it is not enough or is something wrong. Thank you for help.
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Just ssh port forward to the ispconfig interface. Eg. assuming it's running on port 8081, use something like:
    Code:
    ssh -L 1234:127.0.0.1:8081 [email protected]
    Then connect in your web browser to https://127.0.0.1:1234/
     

Share This Page