Oficina A, posiblemente hasta mañana no pueda exportar el otro router
# jul/29/2020 13:30:44 by RouterOS 6.47.1
# software id = XXXX-XXXX
#
# model = RBXX11iGS
# serial number = XXXXXXXXXXXX
/interface bridge
add igmp-snooping=yes name=bridge1
/interface wireless
set [ find default-name=wlan1 ] band=5ghz-a/n/ac channel-width=\
20/40/80/160mhz-XXXXXXXX frequency=auto mode=ap-bridge ssid=NoSpot \
station-roaming=enabled wps-mode=disabled
set [ find default-name=wlan2 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
disabled=no frequency=auto mode=ap-bridge ssid=nolink station-roaming=\
enabled
/interface ethernet
set [ find default-name=ether1 ] comment=WAN
set [ find default-name=ether2 ] comment=LAN
/interface vlan
add interface=ether1 name=vlan3 vlan-id=3
add interface=ether1 name=vlan6 vlan-id=6
/interface pppoe-client
add add-default-route=yes allow=pap,chap disabled=no interface=vlan6 \
keepalive-timeout=60 max-mru=1492 max-mtu=1492 name=internet \
use-peer-dns=yes user=adslppp@telefonicanetpa
/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=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
add authentication-types=wpa-psk,wpa2-psk eap-methods="" group-ciphers=\
tkip,aes-ccm mode=dynamic-keys name= supplicant-identity="" \
unicast-ciphers=tkip,aes-ccm
/interface wireless
add keepalive-frames=disabled mac-address=00:11:22:33:44:55 master-interface=\
wlan2 multicast-buffering=disabled name="" \
security-profile=clientes ssid="" station-roaming=enabled \
wds-cost-range=0 wps-mode=disabled
add default-forwarding=no disabled=no keepalive-frames=disabled mac-address=\
00:11:22:33:44:55 master-interface=wlan2 multicast-buffering=disabled \
name=clientes security-profile= ssid= station-roaming=\
enabled wds-cost-range=0 wds-default-cost=0 wps-mode=disabled
/ip ipsec peer
add exchange-mode=ike2 name=ike2-peer passive=yes
/ip ipsec profile
set [ find default=yes ] dh-group=modp2048 enc-algorithm=\
aes-256,aes-192,aes-128,3des,blowfish
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha256,sha1 enc-algorithms="aes-256-c\
bc,aes-256-gcm,aes-192-cbc,aes-192-gcm,aes-128-cbc,aes-128-gcm,3des" \
pfs-group=modp2048
/ip pool
add name=vpn_pool ranges=10.0.0.2-10.0.0.11
add name=as ranges=192.168.10.2-192.168.10.8
add name=es ranges=192.168.99.2-192.168.99.4
add name=L2TP ranges=10.0.1.2-10.0.1.11
add name=ikev2-pool ranges=10.10.10.10-10.10.10.20
/ip dhcp-server
add address-pool=as disabled=no insert-queue-before=bottom interface=\
as name=as
add address-pool=es disabled=no interface="" \
name=""
/ip ipsec mode-config
add address-pool=ikev2-pool address-prefix-length=32 name=ike2-config
/ppp profile
add local-address=vpn_pool name=Openvpn remote-address=vpn_pool \
use-encryption=yes
/system logging action
set 0 memory-lines=65535
set 1 disk-file-count=3 disk-lines-per-file=65535
/interface bridge port
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether5
add bridge=bridge1 interface=ether6
add bridge=bridge1 interface=ether7
add bridge=bridge1 interface=ether8
add bridge=bridge1 interface=ether9
add bridge=bridge1 interface=ether10
add bridge=bridge1 interface=sfp-sfpplus1
/interface bridge settings
set use-ip-firewall-for-pppoe=yes use-ip-firewall-for-vlan=yes
/ip firewall connection tracking
set tcp-established-timeout=10s
/ip settings
set tcp-syncookies=yes
/interface l2tp-server server
set authentication=mschap1,mschap2 default-profile=L2TP enabled=yes \
one-session-per-host=yes use-ipsec=required
/interface list member
add interface=ether1 list=WAN
add interface=ether2 list=LAN
add interface=ether3 list=LAN
add interface=ether4 list=LAN
add interface=ether5 list=LAN
add interface=ether6 list=LAN
add interface=ether7 list=LAN
add interface=ether8 list=LAN
add interface=ether9 list=LAN
add interface=ether10 list=LAN
add interface=sfp-sfpplus1 list=LAN
/interface ovpn-server server
set auth=sha1 certificate=SERVER cipher=aes128,aes192,aes256 default-profile=\
Openvpn enabled=yes require-client-certificate=yes
/ip address
add address=172.16.1.1/24 comment="default configuration" interface=bridge1 \
network=172.16.1.0
add address=192.168.100.10/24 interface=ether1 network=192.168.100.0
add address=192.168.10.1/24 interface=as network=192.168.10.0
add address=192.168.99.1/24 interface="es" network=192.168.99.0
/ip cloud
set ddns-enabled=yes
/ip dhcp-client
add add-default-route=no disabled=no interface=vlan3 use-peer-ntp=no
/ip dhcp-server network
add address=172.16.1.0/24 dns-server=1.1.1.1,1.0.0.1 gateway=172.16.1.1 \
netmask=24
add address=192.168.10.0/24 dns-server=1.1.1.1,1.0.0.1 gateway=192.168.10.1
add address=192.168.99.0/24 dns-server=1.1.1.1,1.0.0.1 gateway=192.168.99.1
/ip dns
set servers=1.1.1.1,1.0.0.1
/ip firewall filter
add action=accept chain=input dst-port=1701,500,4500 protocol=udp
add action=accept chain=input protocol=ipsec-esp
add action=accept chain=input protocol=ipsec-ah
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=input comment="Allow OpenVPN" dst-port=1194 protocol=\
tcp
add action=drop chain=input dst-port=22 protocol=tcp src-address-list=\
ssh_blacklist
add action=add-src-to-address-list address-list=block-addr \
address-list-timeout=32w chain=input comment="DDOS ATACK" \
connection-limit=10,32 protocol=tcp
add action=tarpit chain=input connection-limit=3,32 protocol=tcp \
src-address-list=block-addr
add action=add-src-to-address-list address-list=Port_Scanner \
address-list-timeout=35w3d chain=input comment="Port Scanner Detect" \
log=yes protocol=tcp psd=31,3s,3,1
add action=drop chain=input comment="Drop to port scan list" log=yes \
src-address-list=Port_Scanner
add action=drop chain=forward comment="No Ping x.x.10.x" connection-state=\
invalid in-interface=all-ethernet in-interface-list=all log=yes \
out-interface-list=all protocol=icmp src-address=192.168.10.0/24
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked log=yes
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=accept chain=forward comment="defconf: accept out ipsec policy" \
ipsec-policy=out,ipsec
add chain=input comment="default configuration" protocol=icmp
add chain=input comment="default configuration" connection-state=established
add chain=input comment="default configuration" connection-state=related
add action=drop chain=input comment="default configuration" in-interface=\
internet
add action=fasttrack-connection chain=forward connection-state=\
established,related
add chain=forward comment="default configuration" connection-state=\
established
add chain=forward comment="default configuration" connection-state=related
add action=drop chain=forward comment="default configuration" \
connection-state=invalid
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=spam dst-port=25 protocol=tcp
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=drop chain=virus comment="VIRUS DE WINDOWS" dst-port=\
135-139,445,593,4444,4000,995-999,8998,2745,4751,1434 protocol=udp
add action=drop chain=virus dst-port=\
135-139,445,593,4444,4000,995-999,8998,2745,4751,1434 protocol=tcp
add action=drop chain=virus comment=rescaldo dst-port=57372 protocol=udp
add action=jump chain=forward jump-target=virus
add action=accept chain=virus connection-state=new limit=100,5:packet \
protocol=udp tcp-flags=""
add action=drop chain=virus connection-state=new protocol=udp tcp-flags=""
add action=jump chain=forward comment=" SYN Floodprotect" connection-state=\
new jump-target=SYN-Protect protocol=tcp tcp-flags=syn
add action=accept chain=SYN-Protect connection-state=new limit=400,5 \
protocol=tcp tcp-flags=syn
add action=drop chain=SYN-Protect connection-state=new protocol=tcp \
tcp-flags=syn
add action=drop chain=input comment="no ping" connection-state=invalid \
in-interface=internet log=yes protocol=icmp
add action=drop chain=output connection-state=invalid log=yes out-interface=\
all-ethernet protocol=icmp
add action=drop chain=forward connection-state=invalid in-interface=internet \
log=yes out-interface=all-ethernet protocol=icmp
add action=drop chain=forward comment="Disable hop" icmp-options=11:0 log=yes \
protocol=icmp
add action=drop chain=input comment="drop ssh brute forcers" dst-port=22 \
protocol=tcp src-address-list=ssh_blacklist
add action=add-src-to-address-list address-list=ssh_blacklist \
address-list-timeout=1w3d chain=input connection-state=new dst-port=22 \
protocol=tcp src-address-list=ssh_stage3
add action=add-src-to-address-list address-list=ssh_stage3 \
address-list-timeout=1m chain=input connection-state=new dst-port=22 \
protocol=tcp src-address-list=ssh_stage2
add action=add-src-to-address-list address-list=ssh_stage2 \
address-list-timeout=1m chain=input connection-state=new dst-port=22 \
protocol=tcp src-address-list=ssh_stage1
add action=add-src-to-address-list address-list=ssh_stage1 \
address-list-timeout=1m chain=input connection-state=new dst-port=22 \
protocol=tcp
/ip firewall mangle
add action=set-priority chain=postrouting new-priority=4 out-interface=vlan3
add action=set-priority chain=postrouting new-priority=1 out-interface=\
internet
add action=mark-connection chain=prerouting comment=DNS connection-state=new \
new-connection-mark=DNS port=53 protocol=udp
add action=mark-connection chain=postrouting connection-state=new \
new-connection-mark=DNS port=53 protocol=udp
add action=mark-packet chain=prerouting connection-mark=DNS new-packet-mark=\
DNS passthrough=no
add action=mark-packet chain=postrouting connection-mark=DNS new-packet-mark=\
DNS passthrough=no
add action=mark-connection chain=prerouting comment=VOIP new-connection-mark=\
VOIP port=5060,5061,10000-20000 protocol=udp
add action=mark-packet chain=prerouting connection-mark=VOIP new-packet-mark=\
VOIP passthrough=no
add action=mark-connection chain=prerouting comment=UDP connection-state=new \
new-connection-mark=UDP protocol=udp
add action=mark-packet chain=prerouting connection-mark=UDP new-packet-mark=\
UDP passthrough=no
add action=mark-connection chain=prerouting comment=ICMP connection-state=new \
new-connection-mark=ICMP protocol=icmp
add action=mark-connection chain=postrouting connection-state=new \
new-connection-mark=ICMP protocol=icmp
add action=mark-packet chain=prerouting connection-mark=ICMP new-packet-mark=\
ICMP passthrough=no
add action=mark-packet chain=postrouting connection-mark=ICMP \
new-packet-mark=ICMP passthrough=no
add action=mark-packet chain=postrouting comment=ACK new-packet-mark=ACK \
packet-size=0-123 passthrough=no protocol=tcp tcp-flags=ack
add action=mark-packet chain=prerouting new-packet-mark=ACK packet-size=0-123 \
passthrough=no protocol=tcp tcp-flags=ack
add action=mark-connection chain=prerouting comment=HTTP connection-mark=\
!HTTP_BIG connection-state=new new-connection-mark=HTTP port=80,443 \
protocol=tcp
add action=mark-connection chain=prerouting connection-bytes=500000-0 \
connection-mark=HTTP connection-rate=200k-100M new-connection-mark=\
HTTP_BIG protocol=tcp
add action=mark-packet chain=prerouting connection-mark=HTTP_BIG \
new-packet-mark=HTTP_BIG passthrough=no
add action=mark-packet chain=prerouting connection-mark=HTTP new-packet-mark=\
HTTP passthrough=no
add action=mark-connection chain=prerouting comment=OTHER connection-mark=\
no-mark new-connection-mark=OTHER
add action=mark-packet chain=prerouting connection-mark=OTHER \
new-packet-mark=OTHER passthrough=no
/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" \
out-interface=internet
add action=masquerade chain=srcnat comment="default configuration" \
out-interface=ether1
add action=masquerade chain=srcnat comment="default configuration" \
out-interface=vlan3
add action=masquerade chain=srcnat comment="masq. vpn traffic" src-address=\
10.0.1.0/24
/ip firewall raw
add action=drop chain=prerouting protocol=tcp src-port=\
69,111,135-139,445,593,4444,4000,995-999,8998,2745,4751,1434
add action=drop chain=prerouting protocol=udp src-port=\
69,111,135-139,445,593,4444,4000,995-999,8998,2745,4751,1434
add action=drop chain=prerouting src-address-list=ads_list
add action=drop chain=prerouting src-address-list=malwaredomainlist_list
add action=drop chain=prerouting src-address-list=blocklistde_ftp_list
/ip firewall service-port
set ftp disabled=yes
set tftp disabled=yes
set irc disabled=yes
set h323 disabled=yes
set sip disabled=yes
set pptp disabled=yes
set udplite disabled=yes
set dccp disabled=yes
set sctp disabled=yes
/ip ipsec identity
add comment=any-client-psk generate-policy=port-strict mode-config=\
ike2-config my-id=fqdn:server peer=ike2-peer remote-id=user-fqdn:clientX
/ip ipsec policy
set 0 dst-address=0.0.0.0/0 src-address=0.0.0.0/0
/ip route
add distance=255 gateway=255.255.255.255
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set api disabled=yes
set winbox address=
set api-ssl disabled=yes
/ip ssh
set allow-none-crypto=yes forwarding-enabled=remote
/ip upnp interfaces
add interface=bridge1 type=internal
add interface=internet type=external
/ppp profile
add bridge=*1A change-tcp-mss=yes dns-server=1.1.1.1,1.0.0.1 \
insert-queue-before=bottom interface-list=LAN local-address=L2TP name=\
L2TP remote-address=L2TP use-encryption=yes
/ppp secret
add name=IS profile=Openvpn service=ovpn
add name=IS profile=L2TP service=l2tp
/routing rip interface
add interface=vlan3 passive=yes receive=v2
/routing rip network
add network=10.0.0.0/8
/system clock
set time-zone-name=Europe/Madrid
/system identity
set name=X-Core
/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 logging
add prefix="L2TP=>" topics=l2tp
add prefix="IPSEC=>" topics=ipsec
add prefix="OVPN=>" topics=ovpn
/system ntp client
set enabled=yes primary-ntp=129.6.15.28 secondary-ntp=129.6.15.29
/system scheduler
add comment="Update No-IP DDNS" interval=5m name=NO-IP on-event=NO-IP policy=\
read,write,policy,test,password,sniff,sensitive,romon start-date=\
apr/30/2020 start-time=01:52:38
/system script
add dont-require-permissions=yes name=NO-IP owner=\ policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#\
\_No-IP automatic Dynamic DNS update\r\
\n\r\
\n#--------------- Change Values in this section to match your setup -----\
\n# No more changes need\r\
/tool mac-server
set allowed-interface-list=none