[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

dhcp and masquerade



I've got masquerade working on my home network (my linux box is running
2.4.17 currently), but I'm not sure how to configure dhcp. Here is my
/etc/network/interfaces (I have an eth0 also that I was using when I used to
be on a LAN, but it is now commented out, and not being used for anything,
since my internet feed is now coming through ppp0):

auto lo
iface lo inet loopback

auto eth1
iface eth1 inet static
        address 192.168.7.1
        netmask 255.255.255.0
        up echo "1" >/proc/sys/net/ipv4/ip_forward
        up /sbin/iptables -t nat -A POSTROUTING -s 192.168.7.0/24 -o ppp0 -j
MASQUERADE
        down echo "0" >/proc/sys/net/ipv4/ip_forward
        down /sbin/iptables -t nat -F

I assume that I would change 'static' to 'dhcp' above and leave the address
line out? However, the default dhcpd.conf has references to DNS that I don't
know what to do with. Here it is (with comments removed):

option domain-name "fugue.com";
option domain-name-servers toccata.fugue.com;
option subnet-mask 255.255.255.224;
default-lease-time 600;
max-lease-time 7200;

The DHCP mini-howto had the following example:

option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.org";

subnet 192.168.1.0 netmask 255.255.255.0 {
   range 192.168.1.10 192.168.1.100;
   range 192.168.1.150 192.168.1.200;
}

I'm not sure what to put for "domain-name" or "domain-name-server", since
I'm just running a little home network. Also, do I need the
"broadcast-address" and "routers" entries that the how-to suggests? What
about "subnet-mask",etc. I just want to be able to plug into my network with
any pc and have an ip assigned. (Of course, the server itself gets its ip
dynamically assigned by the ISP)

Charles Lewis
lewisc@delta.swau.edu



Reply to: