LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-03-2008, 04:13 PM   #1
jvedi
LQ Newbie
 
Registered: Oct 2008
Posts: 5

Rep: Reputation: 0
Debian Etch Gateway setup, DNS server question.


So I wanted to turn this old Dell machine that's running Debian Etch I had lying around into my gateway/router/firewall so I could get rid of the old D-Link I'm currently using. I went around looking for tutorials on how to do this and finally settled on this one:
http://www.debuntu.org/how-to-set-a-...es-debian-etch

I put in a second NIC, got it properly set up so that eth0 was the external interface configured by DHCP, and eth1 was my internal interface configured as a static 192.168.1.1. I assume that I correctly set up the DHCP server because my Windows machine obtains an IP address, although it is from the end of the range rather than the beginning (192.168.1.199 instead of 100). I just plugged the iptables script that was on the site into an executable file, ran everything, and got no errors. I know that the gateway has a connection, because when I SSH into it, eth0 is correctly configured as the external address, and I can ping internet servers. However none of the machines on the internal network seem to be able to connect to the internet.

I did have some trouble setting up the DNS, as I have no idea what this step is really for. Also, the tutorial uses lan.debuntu.local as the domain name for his setup, but I have no idea what to use for my network, or even if I need a local DNS server. Could anyone explain to me what advantage this affords me, and how this could potentially be messing up my setup?

Thanks in advance, guys.
 
Old 10-03-2008, 06:44 PM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Tell us more of the topology of your network - your firewall obviously has only 2 NICs, so how do other machines in your LAN connect to the firewall?

The most convenient way to set up the other computers correctly is to have dhcpd running on your firewall. It will hand out IP addresses to the LAN as well as set up the gateway (static IP on firewall's LAN side) and set up the DNS. For the DNS you can statically specify the ISP's DNS or you can take time to learn about dhcp and the whole process of Debian network configuration scripts so you can dynamically configure the DNS (whatever DNS was given by the ADSL modem can be passed on).
 
Old 10-03-2008, 11:58 PM   #3
jvedi
LQ Newbie
 
Registered: Oct 2008
Posts: 5

Original Poster
Rep: Reputation: 0
OK, so the first NIC is configured as eth0, and it is configured automatically by DHCP. This is the interface that connects to the cable modem. The second NIC is configured as eth1, and is set up as a static IP (192.168.1.1). eth1 connects to a switch that connects all of the other computers in the house together.

So here are the packages I have installed:
-dhcp3-server - as my DHCP server
-bind9 - as the DNS server
-iptables - for NAT and firewall

I tried to follow the instructions as best as I could from the website I mentioned in my first post, but I think I may have screwed something up in the DNS server setup, as I didn't really know what I am supposed to use where he was using his own domain-name server name.

Like for the part where he is creating the config files in the tutorial, instead of using lan.debuntu.local, I made up my own name: home.batcave.local. Should I be doing this, or should I be doing something else?
 
Old 10-04-2008, 12:20 AM   #4
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Unless you want to handle naming the machines or you need names to make it easier for machines on your LAN to talk to eachother, don't bother with names. If you do use names, you probably want to make sure DHCP assigns the names based on the MAC used to connect from - no point in assigning a different name and IP each time.

So you don't even need BIND9 unless you want to act as the DNS and also act as local DNS for the machine names on your LAN.

In the DHCP settings, use the 'gateway' option to tell all clients that 192.168.1.1 (eth1) is the gateway; if your ADSL modem/router acts as a DNS as well, you can use the 'domain-name-servers' option to statically specify the fixed IP on the ADSL modem/router.

Looking at that tutorial, you can use the same names if you want (or change them - it doesn't matter) - but be careful with some names like "2.168.192.in-addr.arpa" which are used to set up reverse-name-lookup (in this case for net 192.168.2.* - the LAN side of the router in the tutorial - those internet geeks have a weird sense of humor, eh).


You're pretty much on your own unless you want to post the configs and files that you created following that tutorial. Use the CODE blocks - one for each config/file.

Last edited by pinniped; 10-04-2008 at 12:27 AM.
 
Old 10-04-2008, 12:55 AM   #5
jvedi
LQ Newbie
 
Registered: Oct 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the advice, I think I'll post the config files tomorrow morning, since I don't have time right now. Also, if you know of any other tutorials that might be better than this one, I would definitely take a look. Thanks again!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
help needed to setup a DNS server can anyone say how to configure a DNS server subha Linux - Networking 4 04-27-2012 11:50 PM
LXer: Howto setup DHCP Server and Dynamic DNS with BIND in Debian LXer Syndicated Linux News 0 07-27-2008 05:11 PM
debian gateway setup gzober Linux - Networking 10 07-09-2007 07:39 AM
LXer: The Perfect Setup - Debian Etch (Debian 4.0) LXer Syndicated Linux News 0 04-10-2007 01:16 PM
How to setup a simple gateway with Debian Kanon Linux - Networking 2 12-24-2006 05:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration