LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-09-2010, 07:25 AM   #1
dpeterson3
Member
 
Registered: Jun 2008
Distribution: Debian
Posts: 164

Rep: Reputation: 16
Creating a everything server


I have been trying to setup a samba PDC server using samba 4. This server will also act as firewall for the network, the NAT, backup, security camera storage, etc. The network is small, so one machine should be sufficient. I can't seem to understand how to setup the DNS resolver. The machine needs to see itself as a DNS server, but it also needs to be able to get name-servers from the ISP's DHCP server. Every time I change the resolv.conf file, it gets overwritten when I bring the interface back up to pick up the new name server. Not sure how to configure this to work properly. All the tutorials I have seen say edit resolv.conf.
 
Old 11-09-2010, 07:47 AM   #2
jamrock
Member
 
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444

Rep: Reputation: 41
I suspect your network card has been configured to use DHCP. DHCP will set the values of the /etc/resovl.conf file each time the computer starts.

If you configure your network card to use a fixed i.p. address, the problem should go away. At any rate, it is usually a good idea to use fixed i.p. addresses with servers.
 
Old 11-09-2010, 07:54 AM   #3
ddaemonunics
Member
 
Registered: May 2008
Location: Romania
Distribution: Debian
Posts: 242

Rep: Reputation: 41
or make a init script that runs after network and echo's "namserver 127.0.0.1" > /etc/resolv.conf
 
Old 11-09-2010, 09:22 AM   #4
dpeterson3
Member
 
Registered: Jun 2008
Distribution: Debian
Posts: 164

Original Poster
Rep: Reputation: 16
The biggest problem I see is that I don't have a static IP from my ISP, so I have to use DHCP to get on the internet. This is also how I get nameserver information from the ISP (the place this server is going is a non-profit that I believe has a special deal with the phone company, so I have no choice on changing the account type).
Quote:
or make a init script that runs after network and echo's "namserver 127.0.0.1" > /etc/resolv.conf
Is there any good way to make this run every time DHCP changes the file?
 
Old 11-09-2010, 10:15 AM   #5
jamrock
Member
 
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444

Rep: Reputation: 41
Quote:
Originally Posted by dpeterson3 View Post
The biggest problem I see is that I don't have a static IP from my ISP, so I have to use DHCP to get on the internet. This is also how I get nameserver information from the ISP (the place this server is going is a non-profit that I believe has a special deal with the phone company, so I have no choice on changing the account type).
Typically your ISP will give you a dynamic i.p address for your internet connection. This is what you have. You would then have some type of modem/router device that allows the machines on your local network to communicate with the internet. This device sits between your internal network and the internet.

This modem/router will use dhcp to give out internal i.p. addresses to the machines on your network. If your server is on the internal network it would be receiving an i.p. address from the modem/router and not from the ISP directly.

It is the dhcp from the modem that is resetting your /etc/resolv.conf file. It is unrelated to the address given out by the ISP. Unless you have a non-standard configuration.

Last edited by jamrock; 11-09-2010 at 10:16 AM.
 
Old 11-09-2010, 01:37 PM   #6
dpeterson3
Member
 
Registered: Jun 2008
Distribution: Debian
Posts: 164

Original Poster
Rep: Reputation: 16
Forgot you could just say your modem is your DNS server. Lately, I have had the router deal with PPPoE because I use dyndns to be a remote admin. I guess I can come up with another scheme for that. Thanks. Now I feel dumb.
 
Old 11-09-2010, 02:40 PM   #7
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
if your machine is going to be a server then the best way to do it would be to simply edit the interface (often /etc/network/interfaces) to a static internal IP address, or assign it a static reservation based on mac address (the former is easier the latter is impossible unless you have either a dedicated dhcp server or are running dd-wrt, openwrt or some other custom firmware on your router or have a more expensive commercial router that can create static leases) that way the port forwarding always points to the same machine and the resolv.conf will not be constantly overwriten by the dhcp client.
 
Old 11-09-2010, 06:42 PM   #8
jamrock
Member
 
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444

Rep: Reputation: 41
Quote:
Originally Posted by dpeterson3 View Post
Lately, I have had the router deal with PPPoE because I use dyndns to be a remote admin. I guess I can come up with another scheme for that.
I don't see how this is related to the configuration of a machine on your internal network. Can you clarify?

Last edited by jamrock; 11-10-2010 at 10:59 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
creating a server beleth Linux - Newbie 1 06-23-2009 07:28 PM
creating a sychronized suse server with windows server with ldap samba chars098 Linux - Server 0 06-17-2008 08:22 PM
Creating a File Server statto Linux - Newbie 8 11-09-2006 02:23 AM
MY ISP DNS SERVER IP ...is creating some problems for my mail server daaku_n01 Linux - Networking 2 01-23-2006 05:09 PM
creating a server citrus Linux - Newbie 10 02-10-2005 06:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration