Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Need some help setting up a server
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mrhodes
Guru
Guru


Joined: 01 May 2002
Posts: 310
Location: Halifax, NS

PostPosted: Wed Dec 04, 2002 1:47 am    Post subject: Need some help setting up a server Reply with quote

Hello everyone,
I have a question about setting up a gentoo server. Right now, my setup is two computers, my main one, and a web server. As of this writing, the server is running Windows( I would like to change that). The windows server I have is set up to provide internet access, and a dynamic IP to my main computer. What would I need to install in Gentoo to have a similar set up? I figure a DHCP server, but would I need DNS as well? I have DNS set up now in Windows, but not sure if it's nessary. Can anyone give me some tips on server setup?

Thanks very much...

Mike Rhodes
Back to top
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Wed Dec 04, 2002 4:57 am    Post subject: Reply with quote

I'll take a jab at this ...

Quote:
The windows server I have is set up to provide internet access, and a dynamic IP to my main computer.


This is typically one of the main reasons people use their gentoo box. For home firewalling and NAT (Network Address Translation, A.K.A. Dsl/Cable router, A.k.a. Firewall -- for all intents and purposes here)

In gentoo to get NAT working, you need to make sure the appropriate drivers are loaded into your kernel. You can find the necessary information here:

http://projectfiles.com/firewall/install.html

Compiling your kernel is part of the installation manual, found here: http://www.gentoo.org/doc/en/gentoo-x86-install.xml

Then I suggest using the firewall script from the same location: http://projectfiles.com/firewall/ You will need to edit a few lines appropriately.

You will need to download it then type:
Code:
chmod 755 rc.firewall

to make it executable, then run it.
Code:
./rc.firewall


To make it start on start up, copy it to /etc/init.d/iptables:
Code:
cp ~/rc.firewall /etc/init.d/iptables

then execute:
Code:
rc-update add iptables default


Now for the 2nd part of your question: Your Windows PC is getting an IP address from the windows internet connection sharing. This will need to be replaced with dhcpd. I believe
Code:
emerge dhcpd
will install the program for you. Then you need to setup a configuration file for it. This is how mine looks ( /etc/dhcp/dhcpd.conf ):

Code:
authoritative;

ddns-update-style ad-hoc;

log-facility local7;

subnet 10.1.1.0 netmask 255.255.255.0 {
  range 10.1.1.100 10.1.1.200;
  option domain-name-servers 10.1.1.1;
  option domain-name "pwned.com";
  option routers 10.1.1.1;
  option broadcast-address 10.1.1.255;
  default-lease-time 600;
  max-lease-time 7200;
}


Then:
Code:
rc-update add dhcp default

This setup also requires a caching DNS server on 10.1.1.1 (or whatever is your gateway ... otherwise delete that line and add your ISPs DNS servers... personally, I
Code:
emerge bind
and run my own caching server.

Anyways in short DNS is not a necessity for you to run locally (but it sure does speed things up), you can simply direct the requests to your ISP's DNS servers via the /etc/resolv.conf file like you normally would if you didn't have your own dns server.

Hope that helps.
Back to top
View user's profile Send private message
Namor
n00b
n00b


Joined: 14 Jun 2002
Posts: 43
Location: Madison, WI US

PostPosted: Wed Dec 04, 2002 6:33 pm    Post subject: Reply with quote

splooge wrote:


Code:
authoritative;

ddns-update-style ad-hoc;

log-facility local7;

subnet 10.1.1.0 netmask 255.255.255.0 {
  range 10.1.1.100 10.1.1.200;
  option domain-name-servers 10.1.1.1;
  option domain-name "pwned.com";
  option routers 10.1.1.1;
  option broadcast-address 10.1.1.255;
  default-lease-time 600;
  max-lease-time 7200;
}


Then:
Code:
rc-update add dhcp default

This setup also requires a caching DNS server on 10.1.1.1 (or whatever is your gateway ... otherwise delete that line and add your ISPs DNS servers... personally, I
Code:
emerge bind
and run my own caching server.

Anyways in short DNS is not a necessity for you to run locally (but it sure does speed things up), you can simply direct the requests to your ISP's DNS servers via the /etc/resolv.conf file like you normally would if you didn't have your own dns server.

Hope that helps.


How does one go about setting up a DNS server for their internal network?
Back to top
View user's profile Send private message
Lin_Matt
Guru
Guru


Joined: 23 Jun 2002
Posts: 581
Location: TechWasteland (Mississippi)

PostPosted: Wed Dec 04, 2002 8:07 pm    Post subject: Reply with quote

Tell ya what ya need to do here... Check out the Linux Documentation Project. They have a ton of great information on just about any topic around. Matter of fact, http://en.tldp.org/HOWTO/DNS-HOWTO.html should be able to answer your questions about DNS server setup.

I've setup my home network with DHPC, DNS (dynamic hostname updates are sweet!), LDAP, Samba, Cups and Qmail for the mail server... All of this on an AMD K6/2-500 and setup with information from TLDP.

HTH!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum