Install and configure a DHCP server
# apt-get install dhcp3-server
Note: the machine that hosts the DHCP server must be configured for static IP. To configure the server, edit / etc/dhcp3/dhcpd.conf :
# dhcpd.conf ddns -update-style none;
default-lease-time 259200;
max -lease-time 518400;
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
option domain-name-servers 213.36.80.1;
option domain-name "tiscali.fr" range 192.168.1.16 192.168.1.252
;
}
It is possible to assign IP addresses to certain machines invariable, based on the MAC address of the NIC. To do this, add stanzas like this:
host fujitsu
{
hardware ethernet 00:00: e2: 93:07:00
fixed-address 192.168.1.5
}
Then :
# / etc/init.d/dhcp3-server restart
If the file contains a shell (as, for example, a semicolon forgotten: oD), the server simply refuses restart.
client side, an Ethernet card configuration would look like this:
auto eth0 iface eth0 inet dhcp
To obtain an IP address of the server, simply restart the network:
# / etc / init.d / networking restart
server side, you can see the queries DHCP through tail-f / var / log / syslog.
Thursday, July 20, 2006
Coments On Heroine Boobs
A proxy for APT
apt-proxy creates a local cache of packages, which saves bandwidth when installations and updates. With a slow connection, simply complete the installations on a single machine. The subsequent installations can be done quickly from the cache. Apt-proxy package for Ubuntu is in the universe archive:
# apt-get install apt-proxy side "server" configuration is done in / etc / apt-proxy / apt-proxy -v2.conf:
port = 9999 cache_dir = / var / cache / apt-proxy
cleanup_freq = off = off
max_age
max_versions
= 3;; backend servers
[myubuntu] backends =
http://fr.archive.ubuntu.com/ubuntu
http://security .ubuntu.com / ubuntu
server side, / etc / apt / sources.list look like this: deb
http://localhost:9999/myubuntu dapper main restricted universe
Beware of bug: the new version of Ubuntu APT handles HTTP requests differently. Therefore edit / etc / apt / apt.conf and replace
Acquire:: http::Proxy false;
by
Acquire:::: Proxy "False";
server side, do not forget to (re) start / etc / init.d / apt-proxy after each change in the configuration file.
client side, it will also apply the small modification to / etc / apt / apt.conf. Then be edited sources.list like this: deb
http://192.168.1.1:9999/myubuntu dapper main restricted universe
Now, apt-get update will connect to the local server cache.
apt-proxy creates a local cache of packages, which saves bandwidth when installations and updates. With a slow connection, simply complete the installations on a single machine. The subsequent installations can be done quickly from the cache. Apt-proxy package for Ubuntu is in the universe archive:
# apt-get install apt-proxy side "server" configuration is done in / etc / apt-proxy / apt-proxy -v2.conf:
cleanup_freq = off = off
max_age
max_versions
= 3;; backend servers
[myubuntu] backends =
http://fr.archive.ubuntu.com/ubuntu
http://security .ubuntu.com / ubuntu
server side, / etc / apt / sources.list look like this: deb
http://localhost:9999/myubuntu dapper main restricted universe
Beware of bug: the new version of Ubuntu APT handles HTTP requests differently. Therefore edit / etc / apt / apt.conf and replace
Acquire:: http::Proxy false;
by
Acquire:::: Proxy "False";
server side, do not forget to (re) start / etc / init.d / apt-proxy after each change in the configuration file.
client side, it will also apply the small modification to / etc / apt / apt.conf. Then be edited sources.list like this: deb
http://192.168.1.1:9999/myubuntu dapper main restricted universe
Now, apt-get update will connect to the local server cache.
What Is Heather Harmon's Friend Brooke
IPMasquerading
IP Masquerading allows, among other things, to share a dial-up. Recipe specific to Debian and Ubuntu Server.
directory / etc / network / if-up.d
contains a series of scripts that run when the ifup command is invoked. Of course, it could very well create a local script (eg rc.local) that runs at the end of the boot, but the following method is more orthodox, if you will. In this directory, then create a firewall script and edit it like this:
# / bin / sh iptables-F ; iptables-t nat-F iptables-t mangle-F iptables-t nat
- A POSTROUTING-o ppp0-j MASQUERADE
echo 1> / proc/sys/net/ipv4/ip_forward
IP Masquerading allows, among other things, to share a dial-up. Recipe specific to Debian and Ubuntu Server.
directory / etc / network / if-up.d
contains a series of scripts that run when the ifup command is invoked. Of course, it could very well create a local script (eg rc.local) that runs at the end of the boot, but the following method is more orthodox, if you will. In this directory, then create a firewall script and edit it like this:
- A POSTROUTING-o ppp0-j MASQUERADE
echo 1> / proc/sys/net/ipv4/ip_forward
Subscribe to:
Posts (Atom)