2186
Comment:
|
2351
sharing internet
|
Deletions are marked like this. | Additions are marked like this. |
Line 74: | Line 74: |
== Sharing internet === As root: {{{ iptables -t nat -F iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward }}} |
Ideal setup would duplicate mine. Thinkpad X40 with eth1, the wireless interface with Internet on an internal like 192.168.1.64.
[http://www.flickr.com/photos/hendry/418003169/ http://farm1.static.flickr.com/125/418003169_2d614d0ae5.jpg]
The eth0, the wired NIC will serve as the netboot test server. The PXE (network boot) enabled client machine (the old COMPAQ) can be connected typically via a hub (actually a hub isn't required with a Thinkpad as it automagically crosses the cable for you) with patch cable.
eth0 will be setup like so:
iface eth0 inet static address 192.168.2.1 netmask 255.255.255.0
The Debian installer is the authoritative guide for our setup: http://d-i.alioth.debian.org/manual/en.i386/ch04s06.html#dhcpd
Briefy we need the Debian packages dhcp3-server and tftpd-hpa.
/etc/dhcp3/dhcpd.conf
option domain-name "example.com"; default-lease-time 600; max-lease-time 7200; allow booting; allow bootp; # The next paragraph needs to be modified to fit your case subnet 192.168.2.0 netmask 255.255.255.0 { range 192.168.2.200 192.168.2.253; option broadcast-address 192.168.2.255; # the gateway address which can be different # (access to the internet for instance) option routers 192.168.2.1; # indicate the dns you want to use option domain-name-servers 192.168.2.1; } group { next-server 192.168.2.1; host tftpclient { # YOUR client hardware address hardware ethernet 00:d0:b7:52:62:de; #hardware ethernet 00:10:DC:27:6C:15; filename "pxelinux.0"; } }
tail /var/log/syslog to see what's going on with the services.
Copy tftpboot to the right place
monty$ ls /var/lib/tftpboot/ initrd.gz memtest pxelinux.0 pxelinux.cfg vmlinuz
NFS setup
You need the package nfs-kernel-server. With a configuration like:
monty$ cat /etc/exports | grep -v ^# /srv/debian-live *(rw,sync,no_root_squash) monty$ pwd /srv/debian-live monty$ ls casper doc md5sum.txt pics README.html README.mirrors.html README.mirrors.txt README.txt tools
/srv/debian-live is the binary part of the generated net boot live image.
== Sharing internet ===
As root:
iptables -t nat -F iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward