where can i change my external DNS entry from local ip to external ip

Posted August 24, 2018 3.6k views
DNSUbuntu 16.04

dear all

Good morning

my web site can access on my local network by the domain name perfect as ( or or by ip address
but from out my local network ie globally cannot access it can access by the global ip ( and work perfect

i am using linux ubuntu 16.04 server on vmware server and the domain name configre by BIND9

the result for the dig command is

root@ns1:/# dig

; <<>> DiG 9.10.3-P4-Ubuntu <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57556
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2

; EDNS: version: 0, flags:; udp: 4096
; IN A




;; Query time: 0 msec
;; WHEN: Wed Aug 22 08:32:18 CAT 2018

;; MSG SIZE rcvd: 91

the result for the host command is
root@ns1:/# host has address

the result for the nslookup command is
root@ns1:/# nslookup
Address: canonical name =


why i cannit access my wesite globally


1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

Hi there,

Inside of the domain management console of your domain provider, you can create records towards your server. You should create an A record that forwards your domain to

If this is a local server somewhere in your basement at home, you also need to create a NAT entry inside of the NAT table in your router, that would forward port 80 from the outside to your webserver port on the inside running on . This is usually called port-forwarding.

port forwarding is working proper
————————————————————–look at the setup info

Identify Open Ports on Your Internet Connection
your external address

open port finder
Remote Address

Use Current IP
Port Number

Open Port 80 is open on


what do you by the
domain management console of your domain provider,

is tools come by bind9 or get info from ubuntu os

  • Allright, then make an A record to redirect the main domain and www to your ip:

    @ IN A
    www IN A

    • still not working

      bellow is file after change

      ; BIND data file for local loopback interface
      $TTL 604800
      @ IN SOA (
      5 ; Serial
      604800 ; Refresh
      86400 ; Retry
      2419200 ; Expire
      604800 ) ; Negative Cache TTL

      ; Name servers IN NS IN NS

      ; A records for name servers
      ns1 IN A
      ns2 IN A

      ; Other A records
      @ IN A
      www IN A
      @ IN A

      www IN A

      please try to connect the system by the

      that means NAT is working through the router

    • still not solved i add the comment again

      Dear allstill my problem is not solvedi configure the dns server for my domain ( trying i used the commandnslookup (or) www.p4bmarket.sdon the server console i got the the bellow line** server can’t find NXDOMAIN named.conf———————–include “/etc/bind/named.conf.options”;include “/etc/bind/named.conf.local”;include “/etc/bind/named.conf.default-zones”;named.conf.options————————————options {  directory “/var/cache/bind”;          recursion no;        allow-transfer { none; };  forwarders {;;  };  dnssec-validation auto;  auth-nxdomain no;   # conform to RFC1035  listen-on-v6 { any; };};named.conf.local————————-zone “” {        type master;        file “/etc/bind/zones/”;  allow-transfer {; }; };zone “” {        type master;        file “/etc/bind/zones/db.192.168.0”;  allow-transfer {; }; };named.conf.default-zones——————————————-zone “.” {  type hint;  file “/etc/bind/db.root”;};zone “localhost” {  type master;  file “/etc/bind/db.local”;};zone “” {  type master;  file “/etc/bind/zones/db.192.168.0”;};zone “” {  type master;3  file “/etc/bind/db.0”;};zone “” {  type master;  file “/etc/bind/db.255”;};i have path like/etc/bind/zones  incloude tow file like—————————————————-the content like bellow
      db.192.168.0 ———————–;$TTL 604800@ IN SOA (          5   ; Serial      604800   ; Refresh      86400   ; Retry      2419200   ; Expire      604800 ) ; Negative Cache TTL@       IN     NS       IN     NS   IN   PTR   IN   A   IN   A     IN     PTR     IN     PTR       IN     A     IN     A

      ————————————–$TTL 604800@ IN SOA (          5   ; Serial      604800   ; Refresh      86400   ; Retry      2419200   ; Expire      604800 ) ; Negative Cache TTL@   IN     NS   IN     NS     IN A     IN A   IN A   IN A   IN A   IN A—————————————————————–please help me this problem take long time from me

      • Hi there, you need to give some more information in a better organised way. If you are giving us code / logs, please use the CODE button in the text editor.

        What are you trying to do here? Does this domain only need to be running locally? Because I checked the domain ( ), and it is not registered. You need to first buy the domain, then give the registrar (where you bought the domain) your own nameservers to use, then setup the DNS records inside of the NS.