?
Solved

Linux Static IP register in Domain DNS

Posted on 2013-06-04
8
Medium Priority
?
655 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 1500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

800 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