Hola foreros.
Soy nuevo en el tema de Mikrotik, pero tengo bastante experiencia en la configuración de otras plataformas.
Harto de los fallos de firmware en ASUS he decidido cambiar mi instalación a Mikrotik y he empezado por adquirir un RB4011 WIFI para empezar a migrar mi instalación AiMESH de 2 AX92U.
La configuración que tengo actualmente es la siguiente:
Todo funciona de acuerdo a mis expectativas:
IPV4/IPV6, LiveBox NEXT como ATA, velocidad 598/610 sobre fibra 600/600, servidores virtuales, y varios etc. más
Ahora las peticiones a los maestros:
El tema de la gestión de la DNS local, no me funciona en los equipos de la red, es decir al hacer ping a por ejemplo a router.lan desde un equipo en windows no me
lo resuelve, aunque indique que sea IPV4 (ping -4).
En IPV4 puedo indicar los DNS que quiero poner para resolver los dominios, pero en IPV6 no he encontrado el sitio para indicarlos y tengo que usar los del ISP dejando marcado el "Use Peer DNS" en la configuración del Cliente de IPV6.
En la definición de "interface list member" tengo que incluir el ether1 para acceder a la ONT en la lista WAN ya que si la meto en la LAN no me hace ping ¿Por que?
Y ahora una petición especial para @generalpirata en su hilo de "Configuración Triple VLAN Jazztel" habla de que tiene configurado un GrandStream como ATA para quitar el Livebox, yo he comprado un HT812 y tengo los datos SIP pero no consigo que se me registre aunque he comprobado sniffeando que la información que manda el Livebox la mando con el HT812. ¿Puedes echarme una mano?
Perdon por el Quijote que he escrito y un saludo.
Soy nuevo en el tema de Mikrotik, pero tengo bastante experiencia en la configuración de otras plataformas.
Harto de los fallos de firmware en ASUS he decidido cambiar mi instalación a Mikrotik y he empezado por adquirir un RB4011 WIFI para empezar a migrar mi instalación AiMESH de 2 AX92U.
La configuración que tengo actualmente es la siguiente:
Código:
# may/31/2021 10:08:50 by RouterOS 6.48.2
# software id = 1R4Z-DVLJ
#
# model = RB4011iGS+5HacQ2HnD
# serial number = XXXXXXXXXXXX
/interface bridge
add admin-mac=XX:XX:XX:XX:XX:XX auto-mac=no name=BR_LAN protocol-mode=none
/interface vlan
add interface=ether9 name=VLAN_LAN vlan-id=1074
add interface=ether1 name=VLAN_WAN vlan-id=20
/interface ethernet switch port
set 0 default-vlan-id=0
set 1 default-vlan-id=0
set 2 default-vlan-id=0
set 3 default-vlan-id=0
set 4 default-vlan-id=0
set 5 default-vlan-id=0
set 6 default-vlan-id=0
set 7 default-vlan-id=0
set 8 default-vlan-id=0
set 9 default-vlan-id=0
set 10 default-vlan-id=0
set 11 default-vlan-id=0
/interface list
add comment="Lista WAN" name=WAN
add comment="Lista LAN" name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
add authentication-types=wpa2-psk,wpa2-eap mode=dynamic-keys name=MikroTik \
supplicant-identity=MikroTik
/interface wireless
set [ find default-name=wlan1 ] band=5ghz-a/n/ac channel-width=\
20/40/80/160mhz-XXXXXXXX country=spain distance=indoors frequency=auto \
installation=indoor mode=ap-bridge security-profile=MikroTik ssid=\
MikroTik5 station-roaming=enabled wireless-protocol=802.11 wps-mode=\
disabled
set [ find default-name=wlan2 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
country=spain distance=indoors frequency=auto installation=indoor mode=\
ap-bridge security-profile=MikroTik ssid=MikroTik station-roaming=enabled \
wireless-protocol=802.11 wps-mode=disabled
/ip pool
add name=POOL_LAN ranges=192.168.2.201-192.168.2.254
add name=POOL_VOIP ranges=192.168.10.2-192.168.10.10
/ip dhcp-server
add address-pool=POOL_LAN disabled=no interface=BR_LAN name=DHCP_LAN
add address-pool=POOL_VOIP disabled=no interface=VLAN_LAN name=DHCP_VOIP
/ipv6 dhcp-server
add address-pool=POOL_IPV6 interface=BR_LAN name=DHCP_IPV6
/interface bridge port
add bridge=BR_LAN comment=LAN2 interface=ether2
add bridge=BR_LAN comment=LAN3 interface=ether3
add bridge=BR_LAN comment=LAN4 interface=ether4
add bridge=BR_LAN comment=LAN5 interface=ether5
add bridge=BR_LAN comment=LAN6 interface=ether6
add bridge=BR_LAN comment=LAN7 interface=ether7
add bridge=BR_LAN comment=LAN8 interface=ether8
add bridge=BR_LAN comment=LAN9 interface=ether9
add bridge=BR_LAN comment=LAN10 interface=ether10
add bridge=BR_LAN comment=SFP interface=sfp-sfpplus1
add bridge=BR_LAN comment=WLAN1 interface=wlan1
add bridge=BR_LAN comment=WLAN2 interface=wlan2
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ipv6 settings
set accept-router-advertisements=yes
/interface detect-internet
set detect-interface-list=WAN
/interface list member
add comment="Bridge Principal" interface=BR_LAN list=LAN
add comment="VLAN VOIP" interface=VLAN_LAN list=LAN
add comment="Acceso ONT" interface=ether1 list=WAN
add comment="VLAN NEBA" interface=VLAN_WAN list=WAN
/ip address
add address=192.168.2.1/24 interface=BR_LAN network=192.168.2.0
add address=192.168.10.1/24 interface=VLAN_LAN network=192.168.10.0
add address=192.168.100.2/24 interface=ether1 network=192.168.100.0
/ip cloud
set ddns-enabled=yes
/ip dhcp-client
add comment=WAN disabled=no interface=VLAN_WAN use-peer-dns=no
/ip dhcp-server lease
add address=192.168.10.2 client-id=1:XX:XX:XX:XX:XX:XX comment=Livebox \
mac-address=XX:XX:XX:XX:XX:XX server=DHCP_VOIP
add address=192.168.2.6 client-id=1:XX:XX:XX:XX:XX:XX comment=AX92_1 \
mac-address=XX:XX:XX:XX:XX:XX server=DHCP_LAN
add address=192.168.2.7 client-id=1:XX:XX:XX:XX:XX:XX comment=AX92_2 \
mac-address=XX:XX:XX:XX:XX:XX server=DHCP_LAN
add address=192.168.2.8 client-id=1:XX:XX:XX:XX:XX:XX comment=GRANDSTREAM \
mac-address=XX:XX:XX:XX:XX:XX server=DHCP_LAN
/ip dhcp-server network
add address=192.168.2.0/24 domain=lan gateway=192.168.2.1
add address=192.168.10.0/24 dns-server=208.67.222.222,8.8.8.8 domain=lan \
gateway=192.168.10.1
/ip dns
set allow-remote-requests=yes cache-size=4096KiB servers=1.1.1.1,1.0.0.1
/ip dns static
add address=192.168.2.1 name=router.lan
add address=192.168.10.2 name=Livebox.lan
add address=192.168.2.6 name=AX92_1.lan
add address=192.168.2.7 name=AX92_2.lan
add address=192.168.2.8 name=ATA.lan
add address=192.168.100.1 name=ONT.lan
add address=212.106.212.22 name=ims.jazztel.net
/ip firewall address-list
add list=public-ip
add address=XXXXXXXXXXXX.sn.mynetname.net list=public-ip
/ip firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment=\
"defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment=HairPin-NAT dst-address=\
192.168.2.0/24 src-address=192.168.2.0/24
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface-list=WAN
add action=redirect chain=dstnat comment="Transparent DNS" dst-port=53 \
protocol=udp to-ports=53
add action=dst-nat chain=dstnat comment=VNC dst-port=5911 in-interface=\
VLAN_WAN protocol=tcp to-addresses=192.168.2.9 to-ports=5900
add action=dst-nat chain=dstnat comment=VNC dst-port=5910 in-interface=\
VLAN_WAN protocol=tcp to-addresses=192.168.2.9 to-ports=5900
add action=dst-nat chain=dstnat comment=TRRT dst-port=38026 in-interface=\
VLAN_WAN protocol=tcp to-addresses=192.168.2.9 to-ports=38026
add action=dst-nat chain=dstnat comment=SSH dst-port=16622 in-interface=\
VLAN_WAN protocol=tcp to-addresses=192.168.2.64 to-ports=22
add action=dst-nat chain=dstnat comment=LBX dst-port=4080 in-interface=\
VLAN_WAN protocol=tcp to-addresses=192.168.10.2 to-ports=4080
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www address=192.168.2.0/24
set ssh address=192.168.2.0/24
set www-ssl address=192.168.2.0/24 disabled=no
set api disabled=yes
set winbox address=192.168.2.0/24
set api-ssl disabled=yes
/ip smb
set domain=WORKGROUP enabled=yes interfaces=BR_LAN
/ip smb users
add name=myads read-only=no
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=BR_LAN type=internal
add interface=VLAN_WAN type=external
/ipv6 address
add address=::1 from-pool=POOL_IPV6 interface=BR_LAN
/ipv6 dhcp-client
add add-default-route=yes interface=VLAN_WAN pool-name=POOL_IPV6 request=\
prefix script=":delay 5s;\r\
\n/ipv6 address remove [find advertise=yes] \r\
\n/ipv6 address add interface=BR_LAN address=::1/64 from-pool=POOL_IPV6 ad\
vertise=yes"
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
add address=::224.0.0.0/100 comment="defconf: other" list=bad_ipv6
add address=::127.0.0.0/104 comment="defconf: other" list=bad_ipv6
add address=::/104 comment="defconf: other" list=bad_ipv6
add address=::255.0.0.0/104 comment="defconf: other" list=bad_ipv6
/ipv6 firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" port=\
33434-33534 protocol=udp
add action=accept chain=input comment=\
"defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=input comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
add action=accept chain=forward comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=\
"defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment=\
"defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=forward comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
/ipv6 firewall mangle
add action=change-mss chain=forward new-mss=clamp-to-pmtu out-interface=\
VLAN_WAN passthrough=yes protocol=tcp tcp-flags=syn
/ipv6 nd
set [ find default=yes ] disabled=yes hop-limit=64 other-configuration=yes
add interface=BR_LAN other-configuration=yes
/system clock
set time-zone-name=Europe/Madrid
/system leds
add interface=wlan2 leds="wlan2_signal1-led,wlan2_signal2-led,wlan2_signal3-le\
d,wlan2_signal4-led,wlan2_signal5-led" type=wireless-signal-strength
add interface=wlan2 leds=wlan2_tx-led type=interface-transmit
add interface=wlan2 leds=wlan2_rx-led type=interface-receive
/system scheduler
add interval=10m name=DynDNS on-event=DynDNS policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-time=startup
/system script
add dont-require-permissions=no name=DynDNS owner=noadmin policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#\
\_Set needed variables\r\
\n\t:local username \"xxxxxx\"\r\
\n\t:local password \"xxxxxx\"\r\
\n\t:local hostname \"xxxxxx.xxxxxx.net\"\r\
\n\r\
\n\t:global dyndnsForce\r\
\n\t:global previousIP\r\
\n\r\
\n# print some debug info\r\
\n\t:log info (\"UpdateDynDNS: username = \$username\")\r\
\n\t:log info (\"UpdateDynDNS: password = \$password\")\r\
\n\t:log info (\"UpdateDynDNS: hostname = \$hostname\")\r\
\n\t:log info (\"UpdateDynDNS: previousIP = \$previousIP\")\r\
\n\r\
\n# get the current IP address from the internet (in case of double-nat)\r\
\n\t/tool fetch mode=http address=\"checkip.dyndns.org\" src-path=\"/\" ds\
t-path=\"/dyndns.checkip.html\"\r\
\n\t:delay 1\r\
\n\t:local result [/file get dyndns.checkip.html contents]\r\
\n\r\
\n# parse the current IP result\r\
\n\t:local resultLen [:len \$result]\r\
\n\t:local startLoc [:find \$result \": \" -1]\r\
\n\t:set startLoc (\$startLoc + 2)\r\
\n\t:local endLoc [:find \$result \"</body>\" -1]\r\
\n\t:local currentIP [:pick \$result \$startLoc \$endLoc]\r\
\n\t:log info \"UpdateDynDNS: currentIP = \$currentIP\"\r\
\n\r\
\n# Remove the # on next line to force an update every single time - usefu\
l for debugging,\r\
\n# but you could end up getting blacklisted by DynDNS!\r\
\n\r\
\n#:set dyndnsForce true\r\
\n\r\
\n# Determine if dyndns update is needed\r\
\n# more dyndns updater request details http://www.dyndns.com/developers/s\
pecs/syntax.html\r\
\n\r\
\n\t:if ((\$currentIP != \$previousIP) || (\$dyndnsForce = true)) do={\r\
\n\t\t:set dyndnsForce false\r\
\n\t\t:set previousIP \$currentIP\r\
\n\t\t:log info \"\$currentIP or \$previousIP\"\r\
\n\t\t/tool fetch user=\$username password=\$password mode=http address=\"\
members.dyndns.org\" \\\r\
\n\t\tsrc-path=\"nic/update\?system=dyndns&hostname=\$hostname&myip=\$curr\
entIP&wildcard=no\" \\\r\
\n\t\tdst-path=\"/dyndns.txt\"\r\
\n\t\t:delay 1\r\
\n\t\t:local result [/file get dyndns.txt contents]\r\
\n\t\t:log info (\"UpdateDynDNS: Dyndns update needed\")\r\
\n\t\t:log info (\"UpdateDynDNS: Dyndns Update Result: \".\$result)\r\
\n\t\t:put (\"Dyndns Update Result: \".\$result)\r\
\n\t} else={\r\
\n\t\t:log info (\"UpdateDynDNS: No dyndns update needed\")\r\
\n\t}\r\
\n"
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
Todo funciona de acuerdo a mis expectativas:
IPV4/IPV6, LiveBox NEXT como ATA, velocidad 598/610 sobre fibra 600/600, servidores virtuales, y varios etc. más
Ahora las peticiones a los maestros:
El tema de la gestión de la DNS local, no me funciona en los equipos de la red, es decir al hacer ping a por ejemplo a router.lan desde un equipo en windows no me
lo resuelve, aunque indique que sea IPV4 (ping -4).
En IPV4 puedo indicar los DNS que quiero poner para resolver los dominios, pero en IPV6 no he encontrado el sitio para indicarlos y tengo que usar los del ISP dejando marcado el "Use Peer DNS" en la configuración del Cliente de IPV6.
En la definición de "interface list member" tengo que incluir el ether1 para acceder a la ONT en la lista WAN ya que si la meto en la LAN no me hace ping ¿Por que?
Y ahora una petición especial para @generalpirata en su hilo de "Configuración Triple VLAN Jazztel" habla de que tiene configurado un GrandStream como ATA para quitar el Livebox, yo he comprado un HT812 y tengo los datos SIP pero no consigo que se me registre aunque he comprobado sniffeando que la información que manda el Livebox la mando con el HT812. ¿Puedes echarme una mano?
Perdon por el Quijote que he escrito y un saludo.