Solved

Linux Static IP register in Domain DNS

Posted on 2013-06-04
8
647 Views
Last Modified: 2013-06-05
I am completely new to Linux and therefore I hope this is a simple query for those of you who know what they are doing.

Firstly the background.  I have create a Virtual Server on Windows 2008 R2 on which I have installed Linux Mint 14.  I have given it a fixed IP and opened up our firewall to allow internet access to this IP address.  This all works fine and I have installed Apache, mySQL and PHP sucessfully.

My problem is with my network DNS.  At present I can access my new linux box by IP, but it hasn't registered itself with our DNS server.  Therefore when trying to access by name from another computer on our LAN it cannot find it.

I have set the network connection to use our domain name servers, however the resolv.conf file shows a nameserver of 127.0.1.1 which doesn't seem right to me.

Your help will be greatly appreciated.
0
Comment
Question by:John Easton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39219557
Did you use static ip in your guest Mint network configuration?

Try adding your DNS servers in resolv.conf -

nameserver 1.2.3.4

Open in new window

0
 
LVL 11

Author Comment

by:John Easton
ID: 39219590
I set the static IP under Network, then Wired Network, the IP v4 Tab.  I also set the DNS search and search domain here.

I tried added nameserver in resolv.conf but it is cleared when the server is restarted.  The file has the header:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

Open in new window


I should note that I am using the default GUI that came with Linux Mint which I believe is Cinnamon.
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39219634
Sounds like Networkmanager is running. Try the following -

# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com

Open in new window

0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 11

Author Comment

by:John Easton
ID: 39219693
Where do I make this change?  I can't see a folder called sysconfig under etc.
0
 
LVL 21

Accepted Solution

by:
Mazdajai earned 500 total points
ID: 39219728
Sorry, the example was taken from Fedora. Mint is Debian family and it is under /etc/network/interfaces.
Use the following syntax instead -
dns-nameservers xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx

Open in new window

0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39219733
0
 
LVL 11

Author Comment

by:John Easton
ID: 39219832
This had made some progress.  I also added a dns-domain entry.  The resolv.conf now shows the DNS servers I want, plus that 127.0.1.1 address.

Interestingly I can now ping the linux computer from my desktop, but it is still not listed in the DNS server (i.e. I cannot do an NSLookup).

Before giving the computer a static IP (i.e. it got one from DHCP) it did register in DNS - so I know it must be possible.

I think I'm going to call it a day for now and pick it up again tomorrow.
0
 
LVL 11

Author Comment

by:John Easton
ID: 39221632
It think in order to save time I will simply add the record manually to DNS.  It does mean that if I change the IP address in the future I will have to update DNS, but this is not going to happen too often I hope!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have been a lot of times when we have seen the need to enter a large number of DNS entries in a forward lookup zone. The standard procedure would be to launch the DNS Manager console, create the Zone and start adding new hosts using the New…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question