Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-09-2010, 07:25 AM
|
#1
|
Member
Registered: Jun 2008
Distribution: Debian
Posts: 164
Rep:
|
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.
|
|
|
11-09-2010, 07:47 AM
|
#2
|
Member
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444
Rep:
|
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.
|
|
|
11-09-2010, 07:54 AM
|
#3
|
Member
Registered: May 2008
Location: Romania
Distribution: Debian
Posts: 242
Rep:
|
or make a init script that runs after network and echo's "namserver 127.0.0.1" > /etc/resolv.conf
|
|
|
11-09-2010, 09:22 AM
|
#4
|
Member
Registered: Jun 2008
Distribution: Debian
Posts: 164
Original Poster
Rep:
|
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?
|
|
|
11-09-2010, 10:15 AM
|
#5
|
Member
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444
Rep:
|
Quote:
Originally Posted by dpeterson3
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.
|
|
|
11-09-2010, 01:37 PM
|
#6
|
Member
Registered: Jun 2008
Distribution: Debian
Posts: 164
Original Poster
Rep:
|
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.
|
|
|
11-09-2010, 02:40 PM
|
#7
|
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
|
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.
|
|
|
11-09-2010, 06:42 PM
|
#8
|
Member
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444
Rep:
|
Quote:
Originally Posted by dpeterson3
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.
|
|
|
All times are GMT -5. The time now is 04:25 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|