domingo, 9 de diciembre de 2018

MikroTik Balancer

MikroTik configuracion de balanceo

Prototipo de configuración standar, pcc modo router neutro, adaptable para cualquier uso...



Requerimientos mínimos: RB750x, RB450x, RB433x, RB941x, RB3011, PC x86, etc.

#############################################################################
# Borrando la configuracion para iniciar desde cero
/system reset-configuration keep-users yes no-defaults yes
#############################################################################

#############################################################################
# Balanceo de carga con routers neutro - by JHOELIT
#############################################################################
# ether1 = WAN-1
# ether2 = WAN-2
# ether5 = LAN-Clientes
#############################################################################

/interface ethernet
set [ find default-name=ether1 ] comment="Internet WAN 1"
set [ find default-name=ether2 ] comment="Internet WAN 2"
set [ find default-name=ether5 ] comment="Clientes LAN"

/ip address
add address=192.168.1.10/24 interface=ether1 comment="Internet WAN 1"
add address=192.168.2.10/24 interface=ether2 comment="Internet WAN 2"
add address=192.168.10.1/24 interface=ether5 comment="Clientes LAN"

/ip firewall nat
add chain=srcnat out-interface=ether1 action=masquerade comment="WAN-1 enmascarado"
add chain=srcnat out-interface=ether2 action=masquerade comment="WAN-2 enmascarado"

#/ip route

/ip firewall mangle
add chain=prerouting in-interface=ether1 connection-state=new new-connection-mark=ether1_conn action=mark-connection passthrough=yes comment="WAN-1"
add chain=prerouting in-interface=ether2 connection-state=new new-connection-mark=ether2_conn action=mark-connection passthrough=yes comment="WAN-2"
add chain=output connection-mark=ether1_conn new-routing-mark=to_ether1 action=mark-routing passthrough=yes comment="WAN-1"
add chain=output connection-mark=ether2_conn new-routing-mark=to_ether2 action=mark-routing passthrough=yes comment="WAN-2"
add chain=prerouting dst-address=192.168.1.0/24  action=accept in-interface=ether5 comment="Acces WAN-1"
add chain=prerouting dst-address=192.168.2.0/24  action=accept in-interface=ether5 comment="Acces WAN-2"
add chain=prerouting in-interface=ether5 connection-state=new dst-address-type=!local per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=ether1_conn passthrough=yes comment="WAN-1" 
add chain=prerouting in-interface=ether5 connection-state=new dst-address-type=!local per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=ether2_conn passthrough=yes comment="WAN-2"
add chain=prerouting in-interface=ether5 connection-mark=ether1_conn action=mark-routing new-routing-mark=to_ether1 passthrough=yes comment="WAN-1"
add chain=prerouting in-interface=ether5 connection-mark=ether2_conn action=mark-routing new-routing-mark=to_ether2 passthrough=yes comment="WAN-2"

/ip route
add gateway=192.168.1.1 routing-mark=to_ether1 check-gateway=ping comment="WAN-1"
add gateway=192.168.2.1 routing-mark=to_ether2 check-gateway=ping comment="WAN-2"
#/ip route
add gateway=192.168.1.1 check-gateway=ping distance=1 comment="WAN-1"

add gateway=192.168.2.1 check-gateway=ping distance=2 comment="WAN-2"

#############################################################################
# OPCIONAL (ether5) PUEDE PONER IP AUTOMÁTICA (lan)
#############################################################################

/ip dns
set servers=8.8.8.8,8.8.4.4
/ip pool
add name=dhcp_pool ranges=192.168.10.2-192.168.10.254
/ip dhcp-server
add address-pool=dhcp_pool disabled=no interface=ether5 name=dhcp1
/ip dhcp-server network
add address=192.168.10.0/24 gateway=192.168.10.1

/system clock
set time-zone-autodetect=yes

/system identity
set name=Balancer by JHOELIT

#############################################################################
# MEDIDAS DE SEGURIDAD (Opcional)
#############################################################################

/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes

############################################################################
# ESTABLECIENDO ULTIMO RESPALDO
############################################################################

/system backup save name="JHOELIT-CONFIG-BALANCER"

#############################################################################
# BALANCEO CON FAILOVER (mediante pago) 
#############################################################################

/tool netwatch (Si cace una linea se arregla automáticamente)

auto-ajuste en: /ip firewall mangle + /ip firewall nat + /ip route


#############################################################################
# OTRAS CONFIGURACIONES Y MODELOS (MEDIANTE PAGO)
#############################################################################
# BALANCEO DISTINTAS VELOCIDADES (mediante pago) 
# BALANCEO MODO ROUTER NEUTRO (mediante pago) + Failover Extra
# BALANCEO MODO BRIDGE O PPPOE (mediante pago)
#############################################################################

Comentar es agradecer, bendiciones a todos... Donar

jueves, 10 de mayo de 2018

MikroTik Setting

MikroTik configurar desde cero

Prototipo de configuración standar, adaptable para cualquier estructuración...


Requerimientos mínimos: RB750x, RB450x, RB433x, RB941x, RB3011, PC x86, etc.



#############################################################################
# 1ra PARTE - CONFIGURACIÓN BÁSICA
#############################################################################


# Estableciendo Configuracion desde cero

/system reset-configuration keep-users yes no-defaults yes

# Estableciendo ajustes para interfaces

/interface ethernet
set [ find default-name=ether1 ] comment="INTERNET"
set [ find default-name=ether2 ] comment="PUERTO_2"
set [ find default-name=ether3 ] comment="PUERTO_3"
set [ find default-name=ether4 ] comment="PUERTO_4"
set [ find default-name=ether5 ] comment="PUERTO_5"

# Estableciendo rangos de ip para nuestras redes

/ip address
add address=192.168.0.11/24 interface=ether1 comment="INTERNET"
add address=192.168.20.1/24 interface=ether2 comment="PUERTO_2"
add address=192.168.30.1/24 interface=ether3 comment="PUERTO_3"
add address=192.168.40.1/24 interface=ether4 comment="PUERTO_4"
add address=192.168.50.1/24 interface=ether5 comment="PUERTO_5"

# Estableciendo Enmascarado de WAN

/ip firewall nat
add chain=srcnat out-interface=ether1 action=masquerade comment="WAN enmascarado"

# Estableciendo Servidores DNS

/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=2048KiB servers=8.8.8.8,8.8.4.4

# Estableciendo puerta de enlace a Internet

/ip route
add check-gateway=ping distance=1 gateway=192.168.0.1 comment="Puerta de enlace"

# Establecer Zona Horaria Automaticamente

/system clock set time-zone-autodetect=yes

# Estableciendo algunas preferencias

/system identity set name="Admin by JHOELIT"

# Estableciendo ultimo Respaldo de JHOELIT

/system backup save name="JHOELIT-CONFIG"


#############################################################################
# 2da PARTE - CONFIGURACIÓN DHCP + HOTSPOT
#############################################################################


# Estableciendo limites de trafico en /queues simple

/queue simple
add max-limit=1M/4M name=PUERTO_2 target="ether2"
add max-limit=1M/4M name=PUERTO_3 target="ether3"
add max-limit=1M/4M name=PUERTO_4 target="ether4"
add max-limit=1M/4M name=PUERTO_5 target="ether5"

# Estableciendo ajustes para DHCP Server

/ip pool
add name=dhcp_pool1 ranges=192.168.20.2-192.168.20.254
add name=dhcp_pool2 ranges=192.168.30.2-192.168.30.254
add name=dhcp_pool3 ranges=192.168.40.2-192.168.40.254
add name=dhcp_pool4 ranges=192.168.50.2-192.168.50.254

/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether2 lease-time=4w2d name=dhcp_server1
add address-pool=dhcp_pool2 disabled=no interface=ether3 lease-time=4w2d name=dhcp_server2
add address-pool=dhcp_pool3 disabled=no interface=ether4 lease-time=4w2d name=dhcp_server3
add address-pool=dhcp_pool4 disabled=no interface=ether5 lease-time=1h name=dhcp_server4

/ip dhcp-server network
add address=192.168.20.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.20.1 comment="PUERTO_2"
add address=192.168.30.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.30.1 comment="PUERTO_3"
add address=192.168.40.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.40.1 comment="PUERTO_4"
add address=192.168.50.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.50.1 comment="PUERTO_5"

# Estableciendo ajustes de Hotspot para PUERTO_5

/ip hotspot profile
add name=Perfil hotspot-address=192.168.50.1 login-by=mac,http-chap dns-name=wifi.login.net

/ip hotspot
add name=Servidor interface=ether5 address-pool=dhcp_pool4 profile=Perfil disabled=no

/ip hotspot user profile
add add-mac-cookie=no name=Ilimitado
add add-mac-cookie=no name=wifi-256KB rate-limit=64k/256k
add add-mac-cookie=no name=wifi-384KB rate-limit=96k/384k
add add-mac-cookie=no name=wifi-512KB rate-limit=128k/512k
add add-mac-cookie=no name=Plan-1MB rate-limit=256k/1M
add add-mac-cookie=no name=Plan-2MB rate-limit=512k/2M
add add-mac-cookie=no name=Plan-3MB rate-limit=768k/3M

/ip hotspot user
add name=admin password=admin
add name=prueba password=prueba profile=wifi-384KB


#############################################################################
# 3ra PARTE - CONFIGURACIÓN DE WAN + SEGURIDAD
#############################################################################


# DHCP CLIENTE EN WAN 
# IP Automatica o internet con dhcp-client

/ip dhcp-client 
add dhcp-options=hostname,clientid disabled=no interface=ether1 comment="INTERNET"

/system scheduler 
add interval=1h name=release_IP on-event="/ip dhcp-client release [find interface=ether1]" start-time=00:00:00 comment="INTERNET"

# ANTI-HACKER 
# Evitar Ataque a Webproxy, DNS cache y WAN

/ip firewall filter 
add action=drop chain=input comment="Bloqueo webproxy externo" disabled=no dst-port=8080 in-interface=ether1 protocol=tcp
add action=drop chain=input comment="Bloqueo DNS cache externo" disabled=no dst-port=53 in-interface=ether1 protocol=udp
add chain=input comment="Firewall WAN" dst-port=8291 in-interface=ether1 protocol=tcp
add chain=input connection-state=established in-interface=ether1
add chain=input connection-state=related in-interface=ether1
add action=drop chain=input in-interface=ether1


#############################################################################
# 4ta PARTE - CONFIGURACIONES CON SOPORTE MEDIANTE PAGO
#############################################################################


# BLOQUEO DE DOMINIOS
# Bloquear contenidos de actualizaciones

# CACHEO DE DNS 
# Redirecccion Local para Cacheo de DNS

# CONTROL DE CONEXIONES 
# Limitar Conexiones P2P, TCP, UDP

# LIBERAR ANCHO DE BANDA 
# Desactivar /queue simple a la media noche

# REINICIAR TODOS LOS DIAS 
# Reiniciar MikroTik automáticamente todos los días

# ANTI-REVENTA PARA CLIENTE 
# Evitar el enrutamientos para que no revendan tu internet

# CONTROL DE IDM 
# Limitar Conexiones de IDM (Internet Download Manager) layer7

# CALIDAD DE SERVICIO (miniQoS) 
# Control de velocidad por dominios

# PRIORIZACIÓN DE TRAFICO (QoS Lite)
# Organizar el trafico priorizando todo

# SOCIAL NETWORK SPEED
# Liberar Velocidad para Redes Sociales

# ANTI-LAG SUPER MEJORADO
# Control inteligente de descargas masivas

# PRIORIZACION DE JUEGOS + ANTI-LAG
# Todo esto y mucho mas, 100% personalizado


#############################################################################
Para estas últimas opciones se recomiendan: RB750Gr3, RB3011UiAS-RM, RB1100AHx4 Dude Edition, CCR1009-8G-1S-1Splus, CCR1036-12G-4S-EM, de acuerdo al tamaño de la red... 👀
#############################################################################


Comentar es agradecer, bendiciones a todos... Donar

sábado, 7 de octubre de 2017

Squid 2.7 + Monitor

Squid 2.7 Full Cache de HTTP

En esta ocasion les presentamos Squid Proxy para Windows


Requerimientos minimos:

Procesador Intel Pentium III
Memoria RAM 256MB
Disco Duro 40GB
Windows XP SP3
Windows Server 2003


Requerimientos adecuados:

Procesador Intel Dual Core
Memoria RAM 4GB
Disco Duro 500GB
Windows 7, Windows 8, Windows 10,
Windows Server 2008, 2012, 2016

Diagrama de red para Squid:



Reglas para MikroTik:



# Redireccion de Clientes

/ip firewall address-list
add address=192.168.20.0/24 disabled=no list="Squid" comment="Proxy Cache"

/ip firewall nat
add action=dst-nat chain=dstnat dst-address=!192.168.10.222 dst-port=80,8080 protocol=tcp src-address-list="Squid" to-addresses=192.168.10.222 to-ports=3128 comment="Redirect Squid"

# Marcado para Full Cacheo

/ip firewall mangle
add action=mark-connection chain=postrouting content="X-Cache: HIT" new-connection-mark=squid-connection protocol=tcp src-address= 192.168.10.222 comment=Squid_Server
add action=mark-packet chain=postrouting connection-mark=squid-connection new-packet-mark=squid-cache-packs

/queue simple
add limit-at=5M/5M max-limit=5M/5M packet-marks=squid-cache-packs priority=6/6 queue=default/default target="" name=Squid_Server

/system scheduler
add name="Squid Servidor" on-event="/queue simple move [/queue simple find name=\"Squid_Server\"] [:pick [find] 1]" start-time=startup interval=10s

# En caso de que se apague el servidor

/tool netwatch
add comment="Servidor Squid" disabled=no down-script="/ip firewall nat set [find comment=\"Redirect Squid\"] disabled=yes" host= 192.168.10.222 interval=2s timeout=2s up-script="/ip firewall nat set [find comment=\"Redirect Squid\"] disabled=no"


Descargar Squid Actualización 2.0: http://goo.gl/RSYxiM


Configuración de proxy manual sin MikroTik



Capturas de Pantalla:


Que Dios los bendiga...

sábado, 6 de mayo de 2017

HandyCache Rev 5.4 Beta3

HandyCache Rev5.4 Beta3



Redireccion de FTP, HTTP, HTTPS,

Cache de Youtube, Vimeo, Daylimotion, Facebook, Tiwitter, Myspace, Redes Sociales, Paginas de Uso Masivo, Wikipedia y Mas.


Requisitos:

Procesador Intel Core i3 de Ultima Generación
Memoria RAM 12GB
Disco Duro de 2TB
Tarjeta de Red 10/100/1000MBps
Windows Server 2016 Datacenter


Diagrama del funcionamiento de HandyCache


Privoxy paralelo a dos HandyCache


Scrip Wpad Implementado

Demostracion en Youtube
http://youtu.be/VByAImPac0c



Pronto estaré actualizando
Para mas información escribir al facebook
http://fb.com/groups/handycachemikrotikredes

MikroTik Balancer

MikroTik configuracion de balanceo Prototipo de configuración standar, pcc modo router  neutro,  adaptable para cualquier uso... Req...