Servidor Luis platinetti

Armado de particiones

fdisk /dev/hda

Disco /dev/hda: 160.0 GB, 160041885696 bytes
255 cabezas, 63 sectores/pista, 19457 cilindros
Unidades = cilindros de 16065 * 512 = 8225280 bytes

Disposit. Inicio    Comienzo      Fin      Bloques  Id  Sistema
/dev/hda1               1          31      248976   83  Linux
/dev/hda2              32       19457   156039345    5  Extendida
/dev/hda5           19336       19457      979965   83  Linux
/dev/hda6           19092       19334     1951866   83  Linux
/dev/hda7           17875       19090     9767488+  83  Linux
/dev/hda8           17388       17873     3903763+  83  Linux
/dev/hda9            7661       17386    78124063+  83  Linux
/dev/hda10             32        7659    61271847   83  Linu
cat /etc/fstab

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda5       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda1       /boot           ext3    defaults        0       2
/dev/hda9       /home           ext3    defaults        0       2
/dev/hda6       /swap           ext3    defaults        0       2
/dev/hda7       /tmp            ext3    defaults        0       2
/dev/hda8       /user           ext3    defaults        0       2
/dev/hda10      /var            ext3    defaults        0       2
/dev/hdb        /media/cdrom0   udf,iso9660 user,noauto     0       0
df -h

S.ficheros          Tamaño Usado  Disp Uso% Montado en
/dev/hda5             942M  333M  562M  38% /
tmpfs                 312M     0  312M   0% /lib/init/rw
udev                   10M   60K   10M   1% /dev
tmpfs                 312M  8,0K  312M   1% /dev/shm
/dev/hda1             236M   17M  207M   8% /boot
/dev/hda9              74G  180M   70G   1% /home
/dev/hda6             1,9G   35M  1,8G   2% /swap
/dev/hda7             9,2G  150M  8,6G   2% /tmp
/dev/hda8             3,7G   72M  3,5G   3% /user
/dev/hda10             58G  329M   55G   1% /var

Configuración de interface

interface

cat /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
        address 192.168.11.1
        netmask 255.255.255.0
        network 192.168.11.0
        broadcast 192.168.11.255
        gateway 192.168.11.1


auto dsl-provider
iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth1 up # line maintained by pppoeconf
provider dsl-provider

auto eth1

iface eth1 inet manual

DNS

Archivo /etc/ppp/peers/dsl-provider

nano /etc/ppp/peers/dsl-provider

# Minimalistic default options file for DSL/PPPoE connections

noipdefault
defaultroute
replacedefaultroute
hide-password
#lcp-echo-interval 30
#lcp-echo-failure 4
noauth
persist
#mtu 1492
#persist
#maxfail 0
#holdoff 20
plugin rp-pppoe.so ssh

#Por LORDBASEX
#usepeerdns
nic-ssh
user "luisplatinetti@arnet-cat-glc"

Archivo /etc/ppp/peers/provider

nano /etc/ppp/peers/provider

# example configuration for a dialup connection authenticated with PAP or CHAP
#
# This is the default configuration used by pon(1) and poff(1).
# See the manual page pppd(8) for information on all the options.

# MUST CHANGE: replace myusername@realm with the PPP login name given to
# your by your provider.
# There should be a matching entry with the password in /etc/ppp/pap-secrets
# and/or /etc/ppp/chap-secrets.
user "myusername@realm"

# MUST CHANGE: replace ******** with the phone number of your provider.
# The /etc/chatscripts/pap chat script may be modified to change the
# modem initialization string.
connect "/usr/sbin/chat -v -f /etc/chatscripts/pap -T ********"

# Serial device to which the modem is connected.
/dev/modem

# Speed of the serial line.
115200

# Assumes that your IP address is allocated dynamically by the ISP.
noipdefault
# Try to get the name server addresses from the ISP.
#usepeerdns
# Use this connection as the default route.
defaultroute

# Makes pppd "dial again" when the connection is lost.
persist

# Do not ask the remote to authenticate.
noauth

Configuración de dhclient

nano /etc/dhcp3/dhclient.conf
# Configuration file for /sbin/dhclient, which is included in Debian's
#       dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
#       man page for more information about the syntax of this file
#       and a more comprehensive list of the parameters understood by
#       dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
#       not leave anything out (like the domain name, for example), then
#       few changes must be made to this file, if any.
#

#send host-name "andare.fugue.com";
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;

# Por LORDBASEX
supersede domain-name "serverlop";
supersede domain-name-servers 127.0.0.1;
# prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, host-name,
        netbios-name-servers, netbios-scope, interface-mtu;
#require subnet-mask, domain-name-servers

#timeout 60;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;

#alias {
#  interface "eth0";
#  fixed-address 192.5.5.213;
#  option subnet-mask 255.255.255.255;
#}

#lease {
#  interface "eth0";
#  fixed-address 192.33.137.200;
#  medium "link0 link1";
#  option host-name "andare.swiftmedia.com";
#  option subnet-mask 255.255.255.0;
#  option broadcast-address 192.33.137.255;
#  option routers 192.33.137.250;
#  option domain-name-servers 127.0.0.1;
#  renew 2 2000/1/12 00:00:01;
#  rebind 2 2000/1/12 00:00:01;
#  expire 2 2000/1/12 00:00:01;
#}

Archivo /etc/hosts

nano /etc/hosts

127.0.0.1       localhost localhost.localdomain
127.0.1.1       srv1 srv1.serverlop
192.168.11.1    srv1 srv1.serverlop

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Configurando nombre del servidor /etc/hostname

nano /etc/hostname

srv1

db.192.168.11

$ORIGIN .
$TTL 86400      ; 1 day
11.168.192.in-addr.arpa IN SOA  srv1.serverlop. root.srv1.serverlop. (
                                961703055  ; serial
                                30         ; refresh (30 seconds)
                                600        ; retry (10 minutes)
                                604800     ; expire (1 week)
                                86400      ; minimum (1 day)
                                )
                        NS      dns.serverlop.
$ORIGIN 11.168.192.in-addr.arpa.
1                       PTR     srv1.serverlop.
2                       PTR     dns.serverlop.
3                       PTR     usersrv.serverlop.
4                       PTR     srv2.serverlop.
5                       PTR     samba.serverlop.

db.serverlop

ORIGIN .
$TTL 86400      ; 1 day
serverlop                IN SOA  srv1.serverlop. root.srv1.serverlop. (
                                961902882  ; serial
                                30         ; refresh (30 seconds)
                                600        ; retry (10 minutes)
                                604800     ; expire (1 week)
                                86400      ; minimum (1 day)
                                )
                        NS      dns.serverlop.
                        MX      0 correo.serverlop.
$ORIGIN serverlop.

srv1                    A       192.168.11.1
dns                     A       192.168.11.1
servidor                CNAME   srv1
correo                  CNAME   srv1
time                    CNAME   srv1
usersrv                 CNAME   srv1
samba                   CNAME   srv1
gateway                 CNAME   srv1
proxy                   CNAME   srv1
wpad                    CNAME   srv1


srv2                    A       192.168.11.2

named.conf.local

//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "serverlop" {
        type master;
        file "/etc/bind/db.serverlop";
        allow-update { localhost; };
};

zone "11.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.192.168.11";
        allow-update { localhost; };
};

named.conf.options

options {
        directory "/var/cache/bind";

        // If there is a firewall between you and nameservers you want
        // to talk to, you might need to uncomment the query-source
        // directive below.  Previous versions of BIND always asked
        // questions using port 53, but BIND 8.1 and later use an unprivileged
        // port by default.

        // query-source address * port 53;

        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.

        // forwarders {
        //      0.0.0.0;
        // };


#       auth-nxdomain no;    # conform to RFC1035
#       listen-on-v6 { any; };

        listen-on-v6 { any; };
        listen-on { 127.0.0.1; 192.168.11.1; };
};

DHCPD

dhcp3-server

# Defaults for dhcp initscript
# sourced by /etc/init.d/dhcp
# installed at /etc/default/dhcp3-server by the maintainer scripts

#
# This is a POSIX shell fragment
#

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth0"

dhcpd.conf

#
# Sample configuration file for ISC dhcpd for Debian
#
# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
#

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
# ddns-update-style none;


# option definitions common to all supported networks...
   option domain-name "serverlop";
   ddns-update-style interim;
   option domain-name-servers dns.serverlop;
   option subnet-mask 255.255.255.0;
   option broadcast-address 192.168.11.255;
   option ntp-servers time.serverlop;
   option routers srv1.serverlop;
   option netbios-name-servers samba.serverlop;
   option wpad code 252 = text;
   option wpad "http://wpad.serverlop/wpad.dat\n";

   subnet 192.168.11.0 netmask 255.255.255.0 {
   range 192.168.11.2 192.168.11.10;
   }

   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;

# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.

#subnet 10.152.187.0 netmask 255.255.255.0 {
#}
# This is a very basic subnet declaration.

#subnet 10.254.239.0 netmask 255.255.255.224 {
#  range 10.254.239.10 10.254.239.20;
#  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
#}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.

#subnet 10.254.239.32 netmask 255.255.255.224 {
#  range dynamic-bootp 10.254.239.40 10.254.239.60;
#  option broadcast-address 10.254.239.31;
#  option routers rtr-239-32-1.example.org;
#}

# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
#  range 10.5.5.26 10.5.5.30;
#  option domain-name-servers ns1.internal.example.org;
#  option domain-name "internal.example.org";
#  option routers 10.5.5.1;
#  option broadcast-address 10.5.5.31;
#  default-lease-time 600;
#  max-lease-time 7200;
#}

# Hosts which require special configuration options can be listed in
# host statements.   If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.

#host passacaglia {
#  hardware ethernet 0:0:c0:5d:bd:95;
#  filename "vmunix.passacaglia";
#  server-name "toccata.fugue.com";
#}

# Fixed IP addresses can also be specified for hosts.   These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP.   Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
#host fantasia {
#  hardware ethernet 08:00:07:26:c0:a5;
#  fixed-address fantasia.fugue.com;
#}

# You can declare a class of clients and then do address allocation
# based on that.   The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

#class "foo" {
#  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}

#shared-network 224-29 {
#  subnet 10.17.224.0 netmask 255.255.255.0 {
#    option routers rtr-224.example.org;
#  }
#  subnet 10.0.29.0 netmask 255.255.255.0 {
#    option routers rtr-29.example.org;
#  }
#  pool {
#    allow members of "foo";
#    range 10.17.224.10 10.17.224.250;
#  }
#  pool {
#    deny members of "foo";
#    range 10.0.29.10 10.0.29.230;
#  }
#}

  group {
  use-host-decl-names on;
  authoritative;
  ddns-updates on;
  }




host srv2 {
hardware ethernet 00:0C:29:4D:17:FA ;
fixed-address 192.168.11.2;
}

Firewall

debconf.cfg

#######################################################################
# Feel free to edit this file.  However, be aware that debconf writes #
# to (and reads from) this file too.  In case of doubt, only use      #
# 'dpkg-reconfigure -plow arno-iptables-firewall' to edit this file.  #
# If you really don't want to use debconf, or if you have specific    #
# needs, you're likely better off using                               #
# /etc/arno-iptables-firewall/custom-rules.  Also see README.Debian.  #
#######################################################################
DC_EXT_IF="ppp0"
DC_EXT_IF_DHCP_IP=1
DC_OPEN_TCP="22"
DC_OPEN_UDP=""
DC_INT_IF="eth0"
DC_NAT=1
DC_INTERNAL_NET="192.168.11.0/24"
DC_NAT_INTERNAL_NET="192.168.11.0/24"
DC_OPEN_ICMP=0
 
clientes/serverlop.txt · Última modificación: 2008/12/26 11:22 (editor externo)
 
Excepto donde se indique lo contrario, el contenido de esta wiki se autoriza bajo la siguiente licencia:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki