domingo, 17 de abril de 2011

Como configurar un servidor dhcp en linux

Publicado por Covent en 2:29 ,
El siguiente procedimiento se ha realizado sobre Debian

1.-Instalación del servidor/demonio

apt-get install dhcp3-server
Nos aseguramos que se va a ejecutar cada vez que arranque la máquina

sysv-rc-conf dhcp3-server on
Ahora queda editar el archivo de configuración dhcpd.conf

A continuación un ejemplo práctico.

ddns-update-style none;
ignore client-updates;
option  local-wpad      code    252     =       text;

subnet netmask {

# --- default gateway
      option routers        ;
# --- Netmask
      option subnet-mask    ;
# --- Broadcast Address
      option broadcast-address;
# --- Domain Name, set the domain name for DHCP clients
      option domain-name              "";
# --- Domain name servers, tells the clients which DNS servers to use.
      option domain-name-servers,,,;
      option time-offset              0;      # Eastern Standard Time
# --- Proxy auto configuration file, tells client browsers which Proxy to use -- See proxy.pac examble below
      option  local-wpad      "\n";
# --- Sets the ntp server
      option ntp-servers    
# --- If you need netbios name server, set it here
#     option netbios-name-servers;
# --- Set the range of IPs available for the DHCP to give to clients
# --- Set the default lease time, how much time the client is permited to use the given IP. After that the client tries to renew the use of the IP it is already using. Actually before that time has passed.
      default-lease-time 1209600;
# --- Set the maximum lease time, after that time has passed, the client will have to ask for a new IP.
      max-lease-time 1814400;
# If you need any PC to have a fixed IP, let's say the printer server.
       host printer {
           hardware ethernet 00:08:a1:82:00:11;
Ejemplo de proxy.pac

function FindProxyForURL(url, host) {
      // our local URLs from the domains below don't need a proxy:
      if (shExpMatch(url,"**"))                  {return "DIRECT";}
      if (shExpMatch(url, "**/*"))               {return "DIRECT";}

      // URLs within this network are accessed through
      // port 8080 on
      if (isInNet(host, "",  ""))    {
         return "PROXY";

      // All other requests go through port 8080 of
      // should that fail to respond, go directly to the WWW:
      return "PROXY; DIRECT";

Back Top

0 comentarios:

Publicar un comentario