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

Re: redirect apt to local repository



Hi Alan, folks,

I've been trying this out and for a while it seemed to work fine, but somehow I broke it again. Here's a rundown/reminder of my situation:

trying to mirror parts of the internet to a local hard drive for a classroom that has no internet access. This is being done on an old Dell running Ubuntu hoary, dhcp3-server, and bind9. With help from alan I got bind working, then set to work on dhcp and on getting the 2 ethernet cards to coexist, and found the system no longer worked. In particular, no computer on the network could get any of the addresses defined in /etc/bind/named.conf.local to resolve -- instead they fail with "unknown host: x".

darn it! Not sure what I did wrong, though most of my post-broken-system tinkering has been with getting eth1 to work.

I have 2 network cards:
eth0: local network, running a dhcp server and dns (at first wanted to run dhcp on eth1, but couldn't find the config option that would let me do so). network is 192.168.2.0 eth1: outside world via a wireless router and cable modem [actually won't need this part once the box is installed in the classroom, but was experimenting] network is 192.168.1.0

I've put all the relevant config files on the web at www.derailleur.org/.configfiles/bind in case anyone's interested, but here are some highlights:


/etc/network/interfaces--------------------- this is a little more complicated than it should be maybe -----------------------------

# eth1 -- the outside world
auto eth1
iface eth1 inet static
      address 192.168.2.30
      netmask 255.255.255.0
      broadcast 192.168.2.255
      gateway 192.168.2.1

# put LAN on eth0
auto eth0
iface eth0 inet static
      address 192.168.1.1
      netmask 255.255.255.0
#      broadcast 192.168.1.255  <-- not sure whether I need these lines
				    repeated?
#      gateway 192.168.2.1

# access webserver on eth0:0
auto eth0:0
iface eth0:0 inet static
      address 192.168.1.2
      netmask 255.255.255.0
#      broadcast 192.168.1.255

-/etc/dhcp3/dhcpd.conf---------don't see any problems here...

# option definitions common to all supported networks...
option domain-name "classroom";
option domain-name-servers 192.168.1.1;

default-lease-time 600;
max-lease-time 7200;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option domain-name-servers 192.168.1.1;
option domain-name "classroom";

subnet 192.168.1.0 netmask 255.255.255.0 {
   range 192.168.1.10 192.168.1.100;
}


/etc/bind/named.conf.local--------none of these hosts are found by anyone, even dhcp clients of this machine, who are assigned this ip 192.168.1.1 as DNS server --------------

zone "www.nytimes.com" {
     type master;
     file "/etc/bind/db.com";
};

zone "classroom" {
        type master;
        file "/etc/bind/db.classroom";
};

zone "1.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.1.168.192";
};

zone "archive.ubuntu.com" {
      type master;
      file "/etc/bind/db.archive.ubuntu";
};
-----------------------------------

And for good measure, here's one of the db. files, though they're all very simple:

-db.archive.ubuntu--------------------------
;       $Id: db.home,v 1.1 2002/11/11 16:26:10 alan Exp $
; BIND data file for local domain
;
$TTL    604800
@       IN      SOA     archive.ubuntu.com. archive.ubuntu.com. (
                              5         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      archive.ubuntu.com
archive.ubuntu.com. IN A 192.168.1.1 ; this is odin ; main machine
-----------------------------

to me it looks about the same as it did before I broke everything; but obviously it's not quite. Probably there are all kinds of errors but I can't see them, I appreciate the use of your eyes!

Thanks very much,

matt



Reply to: