Solved

Linux Static IP register in Domain DNS

Posted on 2013-06-04
8
652 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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

695 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