Servidor CETEM


1. Conectar el cable de red de internet en el eth0 (El adaptador de red interno)
2. dhclient eth0
Nota: Es probable que el router este asignando la direccion de nombres de dominio.
Si este es el caso, editameos el archivo /etc/resolv.conf
nameserver 8.8.8.8
nameserver 4.4.4.4
#Automaticamente claro los asigna
#nameserver 190.157.8.33
#nameserver 181.48.0.231

3.Para verigicar utilizamos 2 metodos:
a) Probar en consola
ping www.google.com.co
b) En el navegador
www.google.com.co
Si las dos pruebas son correctas:
En  el adaptador dos (Es decir eth1) se configura como estatico

4. nano /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:30:67:98:76:FD
TYPE=Ethernet
UUID=15fb8c72-d6b0-4c5c-a632-6c40c28d2ba0
ONBOOT=yes
NM_CONTROLLED=no  #No permite modificar la conexion desde networkmanager
BOOTPROTO=static
IPADDR=192.168.0.60
NETMASK=255.255.255.0
NETWORK=192.168.0.0
GATEWAY=192.168.0.1
DNS1=8.8.8.8
DNS2=4.4.4.4

#Los que provee claro son: 190.157.8.33 y 181.48.0.231

5. nano /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
HWADDR=00:50:BF:38:98:39
TYPE=Ethernet
UUID=fe7c3be2-3a95-4f3f-81fd-609da8227834
NM_CONTROLLED=no #No permite modificar la conexion desde networkmanager
BOOTPROTO=static
IPADDR=192.168.100.250
NETMASK=255.255.255.0
#NETWORK=192.168.100.0
ONBOOT=yes

6. El Route sale asi: [ESTE PASO NO SE REALIZA]
[root@CETEMSERVER jcoral]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.100.0   *               255.255.255.0   U     0      0        0 eth1
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
link-local      *               255.255.0.0     U     1002   0        0 eth0
link-local      *               255.255.0.0     U     1003   0        0 eth1

Entonces se los elimina

route del -net 192.168.100.0 netmask 255.255.255.0 dev eth1
route del -net link-local netmask 255.255.0.0 dev eth1
route del -net link-local netmask 255.255.0.0 dev eth0

7. Habilitar Packet Forwarding
nano /etc/sysctl.conf
net.ipv4.ip_forward = 1
service network restart
sysctl -p

8. Compartir internet
service iptables stop
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
service iptables save
service iptables restart
http://wiki.deister.net/wiki/Linux:CentOS_internet_connection_sharing

9. yum -y install dhcp
chkconfig dhcpd on

nano /etc/sysconfig/dhcpd
DHCPDARGS=eth1

nano /etc/dhcp/dhcpd.conf

option domain-name "cetem.org";
option domain-name-servers 208.67.222.222, 208.67.220.220;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
option broadcast-address 192.168.100.255;

host pc01 {
        option host-name "pc01.cetem.org";
        hardware ethernet E0:DB:55:B5:4A:94;
        fixed-address 192.168.100.252;
}

host cableado_Armando_lpt{
        option host-name "cableado_Armando_lpt.cetem.org";
        hardware ethernet 6C:62:6D:2C:ED:1E;
        fixed-address 192.168.100.120;
}
host inalmbrico_Armando_lpt{
        option host-name "inalambrico_Armando_lpt.cetem.org";
        hardware ethernet E0:B9:A5:05:1F:D3;
        fixed-address 192.168.100.121;
}


host pro_Armando_cel{
        option host-name "pro_Armando_cel.cetem.org";
        hardware ethernet 00:16:D4:BC:A6:10;
        fixed-address 192.168.100.122;
}

host alu_Christian_cel{
        option host-name "alu_Christiano_cel.cetem.org";
        hardware ethernet 5C:70:A3:2F:BE:1C;
        fixed-address 192.168.100.88;
}
host  tioCarlos_cel{
        option host-name "tioCarlos.cetem.org";
        hardware ethernet 40:BA:61:A2:CC:E3;
        fixed-address 192.168.100.123;
}
host  natin_cel{
        option host-name "natin.cetem.org";
        hardware ethernet BC:63:64:91:4F:A7;
        fixed-address 192.168.100.124;
}
host  alejo_cel{
        option host-name "alejo.cetem.org";
        hardware ethernet 74:BA:DB:08:AA:31;
        fixed-address 192.168.100.125;
}

host  mercy_cel{
        option host-name "mercy.cetem.org";
        hardware ethernet 18:1E:B0:0A:F2:BB;
        fixed-address 192.168.100.126;
}

subnet 192.168.100.0 netmask 255.255.255.0 {
  range 192.168.100.1 192.168.100.254;
  option routers 192.168.100.250;
  option domain-name-servers 208.67.222.222, 208.67.220.220;
}

Luego procedemos a guardar los cambios a a reiniciar el servicio.
service dhcpd start
Nota:Hay que tener en cuenta, la subred en la que se encuentra eth1.
En este caso la direccion de eth1 es 192.168.100.250
Si por alguna razon el servidor responde con el mensaje [FALLO], nos
podemos remitir a los mensajes de registro con:
nano /var/log/messages
10. Le decimos al sistema operativo que lo cargue al inicio automaticamente como servicio.
 chkconfig dhcpd on
11. Reiniciamos y nos aseguramos que inicie como servicio.
netstat -lun
si aparece abierto el puerto 63 esta bien
udp        0      0 0.0.0.0:67                  0.0.0.0:*



https://robertomurillo.wordpress.com/2015/05/15/configurar-servidor-dns-dinamico-ddns-y-servidor-dhcp-con-centos-linux/
https://robertomurillo.wordpress.com/2015/05/15/filtrar-contenidos-web-con-dansguardian/
https://robertomurillo.wordpress.com/2015/09/22/pfsense-portal-cautivo-con-autenticacion-local/

https://robertomurillo.wordpress.com/tutoriales/configuracion-basica-del-servidor-dhcp/
https://proyectosri1415ldv.wordpress.com/2014/10/28/3-3-dhcp-en-centos-servidor-tesla/

12.












------------restorecon dhcpd.conf
http://www.krizna.com/centos/install-configure-dhcp-server-centos-6/
https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-dhcp-configuring-server.html


11. Bloquear puertos
yum -y remove dhcp
yum -y install dhcp



http://www.alcancelibre.org/staticpages/index.php/como-dhcp-lan



-------
Dinamica la de internet
DEVICE=eth0
HWADDR=00:30:67:98:76:FD
TYPE=Ethernet
UUID=15fb8c72-d6b0-4c5c-a632-6c40c28d2ba0
ONBOOT=no
NM_CONTROLLED=yes
BOOTPROTO=dhcp
#DNS1=8.8.8.8
#DNS2=4.4.4.4
---------






No hay comentarios:

Publicar un comentario