Torpe_motivado
Usuari@ ADSLzone
- Mensajes
- 76
/ip dns
set allow-remote-requests=yes servers=1.1.1.2,1.0.0.2
# jan/02/1970 01:22:45 by RouterOS 7.3.1
# software id = Y3ZQ-0PU1
#
# model = RBD53iG-5HacD2HnD
# serial number = E72C0E5E0E7A
/interface bridge
add admin-mac=2C:C8:1B:A0:51:71 auto-mac=no comment=defconf frame-types=\
admit-only-vlan-tagged name=bridge vlan-filtering=yes
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
disabled=no distance=indoors frequency=auto installation=indoor mode=\
ap-bridge ssid=MikroTik-A05175 wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=\
20/40/80mhz-XXXX disabled=no distance=indoors frequency=auto \
installation=indoor mode=ap-bridge ssid=MikroTik-A05176 \
wireless-protocol=802.11
/interface vlan
add interface=bridge name=vlan-domotica vlan-id=78
add interface=bridge name=vlan-home vlan-id=77
add interface=bridge name=vlan-invitados vlan-id=79
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 name=internet user=\
adslppp@telefonicanetpa
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add name=ISOLATED
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=dhcp-home ranges=192.168.77.10-192.168.77.254
add name=dhcp-domotica ranges=192.168.78.10-192.168.78.254
add name=dhcp-invitados ranges=192.168.79.10-192.168.79.254
/ip dhcp-server
add address-pool=default-dhcp interface=bridge name=defconf
add address-pool=dhcp-home interface=vlan-home name=dhcp-home
add address-pool=dhcp-domotica interface=vlan-domotica name=dhcp-domotica
add address-pool=dhcp-invitados interface=vlan-invitados name=dhcp-invitados
/interface bridge port
add bridge=bridge comment=defconf frame-types=\
admit-only-untagged-and-priority-tagged interface=ether2 pvid=77
add bridge=bridge comment=defconf frame-types=\
admit-only-untagged-and-priority-tagged interface=ether3 pvid=77
add bridge=bridge comment=defconf frame-types=\
admit-only-untagged-and-priority-tagged interface=ether4 pvid=77
add bridge=bridge comment=defconf frame-types=\
admit-only-untagged-and-priority-tagged interface=ether5 pvid=77
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface bridge vlan
add bridge=bridge comment=home tagged=bridge vlan-ids=77
add bridge=bridge comment=domotica tagged=bridge vlan-ids=78
add bridge=bridge comment=invitados tagged=bridge vlan-ids=79
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=internet list=WAN
add interface=vlan-home list=LAN
add interface=vlan-domotica list=ISOLATED
add interface=vlan-invitados list=ISOLATED
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
192.168.88.0
add address=192.168.77.1/24 interface=vlan-home network=192.168.77.0
add address=192.168.78.1/24 interface=vlan-domotica network=192.168.78.0
add address=192.168.79.1/24 interface=vlan-invitados network=192.168.79.0
/ip dhcp-server network
add address=192.168.77.0/24 comment=home dns-server=192.168.77.1 gateway=\
192.168.77.1
add address=192.168.78.0/24 comment=domotica dns-server=8.8.8.8,8.8.4.4 \
gateway=192.168.78.1
add address=192.168.79.0/24 comment=invitados dns-server=8.8.8.8,8.8.4.4 \
gateway=192.168.79.1
add address=192.168.88.0/24 comment=defconf dns-server=192.168.88.1 gateway=\
192.168.88.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/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 hw-offload=yes
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
add action=reject chain=forward comment="vlans: can only access internet" \
in-interface-list=ISOLATED out-interface-list=!WAN reject-with=\
icmp-network-unreachable
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface-list=WAN
/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
/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
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
Vale, apuntadas las MAC. En el CAP no tienes que hacer nada. Yo lo resetearía, marcando el CAPS Mode y simplemente le quitaría el usuario de admin por uno propio. No te hace falta nada más en ese equipo.Estupendo, no hay prisa, cuando buenamente puedas.
ac3: 2 GHz ...2C:C8:1B:A0:51:75
5 Ghz ...2C:C8:1B:A0:51:76
ac2: 2Ghz ...DC:2C:6E:F6:08:B0
5GHZ ...DC:2C:6E:F6:08:B1
Este último estuvo manejado antes por mi configuración chusquera con CAPSMAN, ¿debería resetarlo, o asume las nuevas reglas?.
Aprovecho para dejarte una pregunta, ya que estuve tan ofuscado con el HGU que no caí,...
¿Se puede levantar temporalmente una vlan en el .88?.
Se supone que los contenedores y el Host del Proxmox estan por DHCP, pero solo los contenedores consiguen una ip en la .77. El Host no la coge, y me imagino que a manubrio podría. (no lo he hecho nunca pero por probar).
Saludos.
################## VARIABLES ##################
:local passhome "passwordW1f1H0me"
:local passdomotica "passwordW1f1D0m0"
:local passinvitados "passwordW1f1Inv1t4d0s"
:local ssidhome "WifiHome"
:local ssiddomotica "WifiDomomotica"
:local ssidinvitados "WifiInvitados"
###############################################
/caps-man channel
add band=2ghz-g/n control-channel-width=20mhz extension-channel=disabled \
frequency=2412 name=2ghz-ch01-20
add band=2ghz-g/n control-channel-width=20mhz extension-channel=disabled \
frequency=2437 name=2ghz-ch06-20
add band=2ghz-g/n control-channel-width=20mhz extension-channel=disabled \
frequency=2462 name=2ghz-ch11-20
add band=5ghz-n/ac control-channel-width=20mhz extension-channel=Ceee \
frequency=5180 name=5ghz-ch036-80
add band=5ghz-n/ac control-channel-width=20mhz extension-channel=Ceee \
frequency=5260 name=5ghz-ch052-80
add band=5ghz-n/ac control-channel-width=20mhz extension-channel=Ceee \
frequency=5500 name=5ghz-ch100-80
/caps-man datapath
add bridge=bridge client-to-client-forwarding=yes name=home vlan-id=77 \
vlan-mode=use-tag
add bridge=bridge client-to-client-forwarding=no name=domotica vlan-id=78 \
vlan-mode=use-tag
add bridge=bridge client-to-client-forwarding=no name=invitados vlan-id=79 \
vlan-mode=use-tag
/caps-man security
add authentication-types=wpa2-psk encryption=aes-ccm group-encryption=aes-ccm \
name=home passphrase=$passhome
add authentication-types=wpa2-psk encryption=aes-ccm group-encryption=aes-ccm \
name=domotica passphrase=$passdomotica
add authentication-types=wpa2-psk encryption=aes-ccm group-encryption=aes-ccm \
name=invitados passphrase=$passinvitados
/caps-man configuration
add channel=2ghz-ch01-20 channel.tx-power=17 country=spain datapath=home \
installation=indoor mode=ap name=2ghz-home-ap0 security=home ssid=$ssidhome
add channel=2ghz-ch06-20 channel.tx-power=17 country=spain datapath=home \
installation=indoor mode=ap name=2ghz-home-ap1 security=home ssid=$ssidhome
add channel=2ghz-ch11-20 country=spain datapath=home \
installation=outdoor mode=ap name=2ghz-home-ap2 security=home ssid=$ssidhome
add channel=5ghz-ch036-80 country=spain datapath=home installation=indoor \
mode=ap name=5ghz-home-ap0 security=home ssid=$ssidhome
add channel=5ghz-ch052-80 country=spain datapath=home installation=indoor \
mode=ap name=5ghz-home-ap1 security=home ssid=$ssidhome
add channel=5ghz-ch100-80 country=spain datapath=home installation=outdoor \
mode=ap name=5ghz-home-ap2 security=home ssid=$ssidhome
add country=spain datapath=domotica mode=ap name=\
domotica security=domotica ssid=$ssiddomotica
add country=spain datapath=invitados mode=ap name=\
invitados security=invitados ssid=$ssidinvitados
/caps-man provisioning
add action=create-dynamic-enabled comment=ac3-cfg-2ghz \
master-configuration=2ghz-home-ap0 \
name-format=prefix-identity name-prefix=2ghz radio-mac=2C:C8:1B:A0:51:75 \
slave-configurations=domotica,invitados
add action=create-dynamic-enabled comment=ac3-cfg-5ghz \
master-configuration=5ghz-home-ap0 \
name-format=prefix-identity name-prefix=5ghz radio-mac=2C:C8:1B:A0:51:76 \
slave-configurations=domotica,invitados
add action=create-dynamic-enabled comment=ac2-cfg-2ghz \
master-configuration=2ghz-home-ap1 \
name-format=prefix-identity name-prefix=2ghz radio-mac=DC:2C:6E:F6:08:B0 \
slave-configurations=domotica,invitados
add action=create-dynamic-enabled comment=ac2-cfg-5ghz \
master-configuration=5ghz-home-ap1 \
name-format=prefix-identity name-prefix=5ghz radio-mac=DC:2C:6E:F6:08:B1 \
slave-configurations=domotica,invitados
add action=create-dynamic-enabled comment=wAP-cfg-2ghz \
master-configuration=2ghz-home-ap2 \
name-format=prefix-identity name-prefix=2ghz radio-mac=AA:BB:CC:11:22:33 \
slave-configurations=domotica,invitados disbled=yes
add action=create-dynamic-enabled comment=wAP-cfg-5ghz \
master-configuration=5ghz-home-ap2 \
name-format=prefix-identity name-prefix=5ghz radio-mac=AA:BB:CC:11:22:34 \
slave-configurations=domotica,invitados disbled=yes
/caps-man manager interface
set [ find default=yes ] forbid=yes
add disabled=no interface=vlan-home
/caps-man manager
set enabled=yes upgrade-policy=suggest-same-version
/interface wireless cap
set bridge=bridge caps-man-addresses=127.0.0.1 enabled=yes interfaces=\
wifi-2ghz,wifi-5ghz
failure: can not have multiple enabled entries with same interface
/interface wireless cap
set bridge=bridge caps-man-addresses=127.0.0.1 enabled=yes interfaces=wifi-2ghz,wifi-5ghz
# jul/07/2022 09:30:09 by RouterOS 7.3.1
# software id = Y3ZQ-0PU1
#
# model = RBD53iG-5HacD2HnD
# serial number = E72C0E5E0E7A
/caps-man channel
add band=2ghz-g/n control-channel-width=20mhz extension-channel=disabled \
frequency=2412 name=2ghz-ch01-20
add band=2ghz-g/n control-channel-width=20mhz extension-channel=disabled \
frequency=2437 name=2ghz-ch06-20
add band=2ghz-g/n control-channel-width=20mhz extension-channel=disabled \
frequency=2462 name=2ghz-ch11-20
add band=5ghz-n/ac control-channel-width=20mhz extension-channel=Ceee \
frequency=5180 name=5ghz-ch036-80
add band=5ghz-n/ac control-channel-width=20mhz extension-channel=Ceee \
frequency=5260 name=5ghz-ch052-80
add band=5ghz-n/ac control-channel-width=20mhz extension-channel=Ceee \
frequency=5500 name=5ghz-ch100-80
/interface bridge
add admin-mac=2C:C8:1B:A0:51:71 auto-mac=no comment=defconf frame-types=\
admit-only-vlan-tagged name=bridge vlan-filtering=yes
/interface wireless
# managed by CAPsMAN
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
distance=indoors frequency=auto installation=indoor mode=ap-bridge ssid=\
MikroTik-A05175 wireless-protocol=802.11
# managed by CAPsMAN
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=\
20/40/80mhz-XXXX distance=indoors frequency=auto installation=indoor \
mode=ap-bridge ssid=MikroTik-A05176 wireless-protocol=802.11
/interface vlan
add interface=bridge name=vlan-domotica vlan-id=78
add interface=bridge name=vlan-home vlan-id=77
add interface=bridge name=vlan-invitados vlan-id=79
/caps-man datapath
add bridge=bridge client-to-client-forwarding=yes name=home vlan-id=77 \
vlan-mode=use-tag
add bridge=bridge client-to-client-forwarding=no name=domotica vlan-id=78 \
vlan-mode=use-tag
add bridge=bridge client-to-client-forwarding=no name=invitados vlan-id=79 \
vlan-mode=use-tag
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 name=internet user=\
adslppp@telefonicanetpa
/caps-man security
add authentication-types=wpa2-psk encryption=aes-ccm group-encryption=aes-ccm \
name=home
add authentication-types=wpa2-psk encryption=aes-ccm group-encryption=aes-ccm \
name=domotica
add authentication-types=wpa2-psk encryption=aes-ccm group-encryption=aes-ccm \
name=invitados
/caps-man configuration
add channel=2ghz-ch01-20 channel.tx-power=17 country=spain datapath=home \
installation=indoor mode=ap name=2ghz-home-ap0 security=home ssid=\
Castillo
add channel=2ghz-ch06-20 channel.tx-power=17 country=spain datapath=home \
installation=indoor mode=ap name=2ghz-home-ap1 security=home ssid=\
Castillo
add channel=2ghz-ch11-20 country=spain datapath=home installation=outdoor \
mode=ap name=2ghz-home-ap2 security=home ssid=Castillo
add channel=5ghz-ch036-80 country=spain datapath=home installation=indoor \
mode=ap name=5ghz-home-ap0 security=home ssid=Castillo
add channel=5ghz-ch052-80 country=spain datapath=home installation=indoor \
mode=ap name=5ghz-home-ap1 security=home ssid=Castillo
add channel=5ghz-ch100-80 country=spain datapath=home installation=outdoor \
mode=ap name=5ghz-home-ap2 security=home ssid=Castillo
add country=spain datapath=domotica mode=ap name=domotica security=domotica \
ssid=Castillo_IOT
add country=spain datapath=invitados mode=ap name=invitados security=\
invitados ssid=Castillo_Invitados
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add name=ISOLATED
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=dhcp-home ranges=192.168.77.10-192.168.77.254
add name=dhcp-domotica ranges=192.168.78.10-192.168.78.254
add name=dhcp-invitados ranges=192.168.79.10-192.168.79.254
/ip dhcp-server
add address-pool=default-dhcp interface=bridge name=defconf
add address-pool=dhcp-home interface=vlan-home name=dhcp-home
add address-pool=dhcp-domotica interface=vlan-domotica name=dhcp-domotica
add address-pool=dhcp-invitados interface=vlan-invitados name=dhcp-invitados
/caps-man manager
set enabled=yes upgrade-policy=suggest-same-version
/caps-man manager interface
set [ find default=yes ] forbid=yes
add disabled=no interface=vlan-home
/caps-man provisioning
add action=create-dynamic-enabled comment=ac3-cfg-2ghz master-configuration=\
2ghz-home-ap0 name-format=prefix-identity name-prefix=2ghz radio-mac=\
2C:C8:1B:A0:51:75 slave-configurations=domotica,invitados
add action=create-dynamic-enabled comment=ac3-cfg-5ghz master-configuration=\
5ghz-home-ap0 name-format=prefix-identity name-prefix=5ghz radio-mac=\
2C:C8:1B:A0:51:76 slave-configurations=domotica,invitados
add action=create-dynamic-enabled comment=ac2-cfg-2ghz master-configuration=\
2ghz-home-ap1 name-format=prefix-identity name-prefix=2ghz radio-mac=\
DC:2C:6E:F6:08:B0 slave-configurations=domotica,invitados
add action=create-dynamic-enabled comment=ac2-cfg-5ghz master-configuration=\
5ghz-home-ap1 name-format=prefix-identity name-prefix=5ghz radio-mac=\
DC:2C:6E:F6:08:B1 slave-configurations=domotica,invitados
add action=create-dynamic-enabled comment=wAP-cfg-2ghz disabled=yes \
master-configuration=2ghz-home-ap2 name-format=prefix-identity \
name-prefix=2ghz radio-mac=AA:BB:CC:11:22:33 slave-configurations=\
domotica,invitados
add action=create-dynamic-enabled comment=wAP-cfg-5ghz disabled=yes \
master-configuration=5ghz-home-ap2 name-format=prefix-identity \
name-prefix=5ghz radio-mac=AA:BB:CC:11:22:34 slave-configurations=\
domotica,invitados
/interface bridge port
add bridge=bridge comment=defconf frame-types=\
admit-only-untagged-and-priority-tagged interface=ether2 pvid=77
add bridge=bridge comment=defconf frame-types=\
admit-only-untagged-and-priority-tagged interface=ether3 pvid=77
add bridge=bridge comment=defconf frame-types=\
admit-only-untagged-and-priority-tagged interface=ether4 pvid=77
add bridge=bridge comment=defconf frame-types=\
admit-only-untagged-and-priority-tagged interface=ether5 pvid=77
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface bridge vlan
add bridge=bridge comment=home tagged=bridge vlan-ids=77
add bridge=bridge comment=domotica tagged=bridge vlan-ids=78
add bridge=bridge comment=invitados tagged=bridge vlan-ids=79
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=internet list=WAN
add interface=vlan-home list=LAN
add interface=vlan-domotica list=ISOLATED
add interface=vlan-invitados list=ISOLATED
/interface wireless cap
#
set enabled=yes interfaces=wlan1,wlan2
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
192.168.88.0
add address=192.168.77.1/24 interface=vlan-home network=192.168.77.0
add address=192.168.78.1/24 interface=vlan-domotica network=192.168.78.0
add address=192.168.79.1/24 interface=vlan-invitados network=192.168.79.0
/ip dhcp-server lease
add address=192.168.77.248 client-id=1:bc:ae:c5:4:1a:c6 mac-address=\
BC:AE:C5:04:1A:C6 server=dhcp-home
add address=192.168.78.252 comment="Detector de GLP. SHelly" mac-address=\
48:3F:DA:1A:32:23 server=dhcp-domotica
/ip dhcp-server network
add address=192.168.77.0/24 comment=home dns-server=192.168.77.1 gateway=\
192.168.77.1
add address=192.168.78.0/24 comment=domotica dns-server=8.8.8.8,8.8.4.4 \
gateway=192.168.78.1
add address=192.168.79.0/24 comment=invitados dns-server=8.8.8.8,8.8.4.4 \
gateway=192.168.79.1
add address=192.168.88.0/24 comment=defconf dns-server=192.168.88.1 gateway=\
192.168.88.1
/ip dns
set allow-remote-requests=yes servers=1.1.1.2,1.0.0.2
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/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 hw-offload=yes
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
add action=reject chain=forward comment="vlans: can only access internet" \
in-interface-list=ISOLATED out-interface-list=!WAN reject-with=\
icmp-network-unreachable
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface-list=WAN
/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
/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
/system clock
set time-zone-name=Europe/Madrid
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
/interface wireless cap
set bridge=bridge caps-man-addresses=127.0.0.1 enabled=yes interfaces=wlan1,wlan2