Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
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.
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?
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).
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?
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.
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.