# model = RB450Gx4
# serial number =
/interface pptp-server
add name="PPTP Server" user=PPTP
/interface ethernet
set [ find default-name=ether1 ] name=LAN
set [ find default-name=ether5 ] name="WAN1 PoE" poe-out=off
set [ find default-name=ether2 ] disabled=yes name=WAN2
set [ find default-name=ether3 ] disabled=yes name=WAN3
set [ find default-name=ether4 ] disabled=yes name=WAN4
/interface l2tp-server
add name="L2TP Server" user=***
/interface vrrp
add disabled=yes interface=LAN name=VRRP priority=255 vrid=16
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip dhcp-server
add disabled=no interface=LAN name=dhcp1
/ip firewall layer7-protocol
add name=Netflix regexp="^.+\\.(netflix|netflix.com|netflixvideo.com).*\\\$"
add name=YouTube regexp="^.+\\.(youtube.com|youtu.be|googlevideo.com|m.youtube.c\
om|youtube.googleapis.com|youtubei.googleapis.com|youtube-nocookie.com|ytimg\
.com|ytimg.l.google.com|video-stats.l.google.com|rewind.youtube|youtube.com.\
br|youtube.co.nz|youtube.de|youtube.es|youtube.it|youtube.nl|youtube.ru).*\\\
\$"
add name=Facebook regexp="^.+\\.(facebook.com).*\\\$"
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip ipsec profile
set [ find default=yes ] dh-group=modp4096,modp2048,modp1024,modp768 \
enc-algorithm=aes-256,aes-192,aes-128,3des hash-algorithm=sha256
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha256,sha1,md5 enc-algorithms=\
aes-256-cbc,aes-192-cbc,aes-128-cbc,3des,des lifetime=0s
/ip pool
add name=DHCP_Pool ranges=10.50.10.10-10.50.10.254
add name=VPN_Pool ranges=10.50.15.50-10.50.15.60
/ipv6 dhcp-server
add address-pool="IPv6 Pool" disabled=yes interface=LAN name="DHCPv6 Server"
/ipv6 pool
add name="IPv6 Pool" prefix-length=63
/ppp profile
add change-tcp-mss=yes dns-server=1.1.1.1,9.9.9.9 local-address=10.50.10.1 \
name=L2TP remote-address=VPN_Pool session-timeout=1d use-encryption=yes
add dns-server=1.1.1.1,9.9.9.9 local-address=10.50.10.1 name=PPTP \
remote-address=VPN_Pool session-timeout=1d use-encryption=yes
/queue type
add kind=sfq name=Download_SFQ sfq-perturb=10
add kind=sfq name=Upload_SFQ sfq-perturb=10
/queue simple
add burst-limit=10M/0 burst-threshold=5M/0 burst-time=5m/0s max-limit=5M/450M \
name="Linksys EA8500" queue=Upload_SFQ/Download_SFQ target="10.50.10.254/32,\
10.50.10.253/32,10.50.10.252/32,10.50.10.251/32,10.50.10.250/32,10.50.10.237\
/32,10.50.10.245/32,10.50.10.248/32,10.50.10.247/32,10.50.10.231/32"
add disabled=yes max-limit=5M/450M name="MacBook Pro LAN" queue=\
Upload_SFQ/Download_SFQ target=10.50.10.254/32
add disabled=yes max-limit=5M/300M name="iPhone 8 Plus" queue=\
Upload_SFQ/Download_SFQ target=10.50.10.252/32
add disabled=yes max-limit=5M/300M name="iPad Pro 10.5 Cellular" queue=\
Upload_SFQ/Download_SFQ target=10.50.10.250/32
add disabled=yes max-limit=1M/3M name="New Nintendo 3DS" queue=\
Upload_SFQ/Download_SFQ target=10.50.10.248/32
add disabled=yes max-limit=1M/50M name=PSVITA queue=Upload_SFQ/Download_SFQ \
target=10.50.10.247/32
add burst-limit=2M/0 burst-threshold=1M/0 burst-time=5m/0s disabled=yes \
max-limit=1M/110M name="PS3 Super Slim" queue=Upload_SFQ/Download_SFQ \
target=10.50.10.245/32
add disabled=yes max-limit=5M/50M name="HP PC WIFI" queue=\
Upload_SFQ/Download_SFQ target=10.50.10.237/32
add burst-limit=5M/0 burst-threshold=1500k/0 burst-time=5m/0s max-limit=\
1500k/110M name="WDR3600 Casa" queue=Upload_SFQ/Download_SFQ target=\
10.50.10.101/32,10.50.10.239/32
add disabled=yes max-limit=1M/20M name="Amazon Fire TV" queue=\
Upload_SFQ/Download_SFQ target=10.50.10.239/32
add max-limit=1M/110M name="PS4 Sala" queue=Upload_SFQ/Download_SFQ target=\
10.50.10.246/32
add burst-limit=5M/0 burst-threshold=1500k/0 burst-time=5m/0s max-limit=\
1500k/80M name=Kasami_WDR3600 queue=Upload_SFQ/Download_SFQ target=\
10.50.10.116/32,10.50.10.241/32
add burst-limit=2M/0 burst-threshold=512k/0 burst-time=5m/0s disabled=yes \
max-limit=512k/20M name="Kasami_PC Ariel" queue=Upload_SFQ/Download_SFQ \
target=10.50.10.241/32
add burst-limit=3M/0 burst-threshold=1M/0 burst-time=5m/0s max-limit=1M/20M \
name=Herminia_Router queue=Upload_SFQ/Download_SFQ target=10.50.10.117/32
add burst-limit=3M/0 burst-threshold=1M/0 burst-time=5m/0s max-limit=1M/20M \
name="Jaimito_Router Sala" queue=Upload_SFQ/Download_SFQ target=\
10.50.10.118/32,10.50.10.232/32
add burst-limit=1M/0 burst-threshold=512k/0 burst-time=5m/0s max-limit=512k/15M \
name="Panchi_Old Router Sala" queue=Upload_SFQ/Download_SFQ target=\
10.50.10.119/32
add burst-limit=5M/0 burst-threshold=1500k/0 burst-time=5m/0s max-limit=\
1500k/120M name="Soto_Router Sala" queue=Upload_SFQ/Download_SFQ target=\
10.50.10.120/32,10.50.10.233/32
add max-limit=1M/50M name="Router Testing" queue=Upload_SFQ/Download_SFQ \
target=10.50.10.243/32
/queue tree
add max-limit=605M name="- QOS Download -" parent=LAN priority=1 queue=\
Download_SFQ
add name="Prio 1 (ICMP, DNS)" packet-mark="PRIO 1" parent="- QOS Download -" \
priority=1 queue=Download_SFQ
add name="Prio 2 (Games, RTSP, VoIP)" packet-mark="PRIO 2" parent=\
"- QOS Download -" priority=2 queue=Download_SFQ
add name="Prio 3 (Web)" packet-mark="PRIO 3" parent="- QOS Download -" \
priority=3 queue=Download_SFQ
add name="Prio 4 (Working Ports)" packet-mark="PRIO 4" parent=\
"- QOS Download -" priority=4 queue=Download_SFQ
add name="Prio 5 (Others)" packet-mark="PRIO 5" parent="- QOS Download -" \
priority=5 queue=Download_SFQ
add name="Prio 7 (Http, Downloads >50mb)" packet-mark="PRIO 7" parent=\
"- QOS Download -" priority=7 queue=Download_SFQ
add max-limit=15M name="- QOS Upload -" parent="WAN1 PoE" priority=1 queue=\
Upload_SFQ
add name="Prio 1 (ICMP, DNS)_U" packet-mark="PRIO 1" parent="- QOS Upload -" \
priority=1 queue=Upload_SFQ
add name="Prio 2 (Games, RTSP, VoIP)_U" packet-mark="PRIO 2" parent=\
"- QOS Upload -" priority=2 queue=Upload_SFQ
add name="Prio 3 (Web)_U" packet-mark="PRIO 3" parent="- QOS Upload -" \
priority=3 queue=Upload_SFQ
add name="Prio 4 (Working Ports)_U" packet-mark="PRIO 4" parent=\
"- QOS Upload -" priority=4 queue=Upload_SFQ
add name="Prio 5 (Others)_U" packet-mark="PRIO 5" parent="- QOS Upload -" \
priority=5 queue=Upload_SFQ
add name="Prio 7 (Http, Downloads >50mb)_U" packet-mark="PRIO 7" parent=\
"- QOS Upload -" priority=7 queue=Upload_SFQ
add name="Web Cache" packet-mark=Web_Cache_Download parent="- QOS Download -" \
priority=3 queue=Download_SFQ
add name=YouTube packet-mark=YouTube parent="- QOS Download -" priority=3 \
queue=Download_SFQ
add max-limit=30M name="Shared Bandwidth - YouTube" packet-mark=YouTube parent=\
YouTube priority=3 queue=Download_SFQ
add max-limit=25M name="iPhone 8 Plus" packet-mark="iPhone 8 Plus_Down" parent=\
YouTube priority=3 queue=Download_SFQ
add max-limit=25M name="iPad Pro 10.5 Cellular" packet-mark=\
"iPad Pro 10.5 Cellular_Down" parent=YouTube priority=3 queue=Download_SFQ
add max-limit=25M name="MacBook Pro WIFI" packet-mark=MBP_WIFI_Down parent=\
YouTube priority=3 queue=Download_SFQ
add max-limit=25M name="MacBook Pro LAN" packet-mark=MBP_LAN_Down parent=\
YouTube priority=3 queue=Download_SFQ
/dude
set data-directory=disk1/dude-data enabled=yes
/interface bridge settings
set allow-fast-path=no
/ip settings
set allow-fast-path=no
/interface detect-internet
set detect-interface-list=all
/interface l2tp-server server
set authentication=mschap1,mschap2 default-profile=L2TP enabled=yes \
ipsec-secret=*** keepalive-timeout=60 max-mru=1460 max-mtu=1460 \
use-ipsec=yes
/interface pptp-server server
set default-profile=PPTP enabled=yes
/ip address
add address=10.50.10.1/24 interface=LAN network=10.50.10.0
add address=10.50.10.3 interface=VRRP network=10.50.10.0
/ip cloud
set ddns-enabled=yes
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface="WAN1 PoE" \
use-peer-dns=no use-peer-ntp=no
add add-default-route=no interface=WAN2 use-peer-dns=no use-peer-ntp=no
add add-default-route=no dhcp-options=hostname,clientid interface=WAN3 \
use-peer-dns=no use-peer-ntp=no
add add-default-route=no dhcp-options=hostname,clientid interface=WAN4 \
use-peer-dns=no use-peer-ntp=no
/ip dhcp-server lease
add address=***
/ip dhcp-server network
add address=10.50.10.0/24 dns-server=10.50.10.1 gateway=10.50.10.1
/ip dns
set allow-remote-requests=yes cache-size=100000KiB servers=\
1.1.1.1,9.9.9.9,8.8.8.8
/ip firewall address-list
add address=10.50.10.1 list=DNS_Accept
add address=1.1.1.1 list=DNS_Accept
add address=8.8.8.8 list=DNS_Accept
add address=9.9.9.9 list=DNS_Accept
/ip firewall filter
add action=accept chain=input comment="Winbox from VPN" dst-port=8291 protocol=\
tcp src-address=10.50.15.50-10.50.15.60
add action=accept chain=input comment="L2TP VPN" dst-port=500,1701,4500 \
protocol=udp
add action=accept chain=input protocol=ipsec-esp
add action=accept chain=input protocol=ipsec-ah
add action=accept chain=input comment="PPTP VPN" dst-port=1723 protocol=udp
add action=accept chain=input protocol=gre
add action=accept chain=DNS_DDoS comment="Make exceptions for DNS" port=53 \
protocol=udp src-address-list=DNS_Accept
add action=accept chain=DNS_DDoS comment="Make exceptions for DNS" \
dst-address-list=DNS_Accept port=53 protocol=udp
add action=jump chain=input comment="Jump to DNS_DDoS Chain" jump-target=\
DNS_DDoS
add action=drop chain=input comment="Block DNS Attacks" dst-port=53 \
in-interface="WAN1 PoE" protocol=tcp
add action=drop chain=input dst-port=53 in-interface="WAN1 PoE" protocol=udp
add action=add-src-to-address-list address-list=DNS_DDoS address-list-timeout=\
none-dynamic chain=DNS_DDoS comment="Add DNS_DDoS Offenders to Blacklist" \
port=53 protocol=udp src-address-list=!DNS_Accept
add action=drop chain=DNS_DDoS comment="Drop DNS_DDoS Offenders" \
src-address-list=DNS_DDoS
add action=return chain=DNS_DDoS comment="Return from DNS_DDoS Chain"
add action=drop chain=input comment="Block Web Cache Attacks" dst-port=8080 \
in-interface="WAN1 PoE" protocol=tcp
add action=reject chain=forward comment="Adblock TCP-Reset" connection-state=\
new dst-address=240.0.0.1 log=yes log-prefix=ADBLOCK protocol=tcp \
reject-with=tcp-reset
add action=reject chain=forward comment="Adblock UDP Unreachable" \
connection-state=new dst-address=240.0.0.1 log=yes log-prefix=ADBLOCK \
protocol=udp reject-with=icmp-network-unreachable
add action=drop chain=forward comment="Adblock Drop" dst-address=240.0.0.1 log=\
yes log-prefix=ADBLOCK
add action=drop chain=forward comment="Moroso - Herminia" disabled=yes \
src-address=10.50.10.110
add action=drop chain=forward comment="Moroso - iPhone" disabled=yes \
src-address=10.50.10.252
add action=reject chain=forward comment="Block Arris Modem Web" disabled=yes \
dst-address=192.168.100.1 reject-with=icmp-admin-prohibited src-address=\
!10.50.10.252
/ip firewall mangle
add action=mark-packet chain=output comment="Web Cache" dscp=4 new-packet-mark=\
Web_Cache_Download passthrough=no
add action=mark-connection chain=prerouting comment=\
":: QoS - Prio 1 (ICMP, DNS)" new-connection-mark="PRIO 1" passthrough=yes \
protocol=icmp
add action=mark-connection chain=prerouting dst-port=53 new-connection-mark=\
"PRIO 1" passthrough=yes protocol=udp
add action=mark-connection chain=output dst-port=53 new-connection-mark=\
"PRIO 1" passthrough=yes protocol=udp
add action=mark-packet chain=prerouting connection-mark="PRIO 1" \
new-packet-mark="PRIO 1" passthrough=yes
add action=jump chain=prerouting jump-target="finish process" packet-mark=\
"PRIO 1"
add action=mark-connection chain=prerouting comment=\
":: QoS - Prio 2 (Games, RTSP, VoIP)" dst-port=\
25,110,465,554,587,777,993,1000,1024-1124,1863,1935,2099,2195-2196 \
new-connection-mark="PRIO 2" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting dst-port=\
2545-2565,3074,3216,3478-3480,4244,5090,5190,5222-5223,5228,5242,5795-5847 \
new-connection-mark="PRIO 2" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting dst-port="6667,6695-6699,7070,8088,8\
393-8400,9960-9969,9988,10000-10100,12313,12400,12975" new-connection-mark=\
"PRIO 2" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting dst-port="17502,18000,18060,22990,27\
014-27050,28910,29900-29901,29920,37777,42127,50000,50318,59234" \
new-connection-mark="PRIO 2" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting dst-port=\
88,500,554,1024-1124,1701,1723,2005,3000-3010,3074-3076,3098,3115,3117 \
new-connection-mark="PRIO 2" passthrough=yes protocol=udp
add action=mark-connection chain=prerouting dst-port=\
3123,3124,3136,3139,3153,3155,3161,3163,3182-3191,3195,3478-3481,3544 \
new-connection-mark="PRIO 2" passthrough=yes protocol=udp
add action=mark-connection chain=prerouting dst-port=\
3658-3659,4379-4380,4500,4950,4955,5000-5500,8088,9305-9308,14000-14016 \
new-connection-mark="PRIO 2" passthrough=yes protocol=udp
add action=mark-connection chain=prerouting dst-port="16384-16387,16393-16402,18\
000,19302-19309,27000-27100,29900,30000,37000,37778,45395,49598" \
new-connection-mark="PRIO 2" passthrough=yes protocol=udp
add action=mark-connection chain=prerouting dst-port=\
50000,55013,55296-55551,57888,60000,61455-61458 new-connection-mark=\
"PRIO 2" passthrough=yes protocol=udp
add action=mark-packet chain=prerouting connection-mark="PRIO 2" \
new-packet-mark="PRIO 2" passthrough=yes
add action=jump chain=prerouting jump-target="finish process" packet-mark=\
"PRIO 2"
add action=mark-connection chain=prerouting comment=":: QoS - Prio 3 (Web)" \
dst-port=80,443 new-connection-mark="PRIO 3" passthrough=yes protocol=tcp
add action=mark-packet chain=prerouting connection-mark="PRIO 3" \
new-packet-mark="PRIO 3" passthrough=yes
add action=jump chain=prerouting jump-target="finish process" packet-mark=\
"PRIO 3"
add action=mark-connection chain=prerouting comment=\
":: QoS - Prio 4 (Working Ports)" dst-port=21-23,25,110,143,1723,3389,5938 \
new-connection-mark="PRIO 4" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting dst-port=5938,20561 \
new-connection-mark="PRIO 4" passthrough=yes protocol=udp
add action=mark-packet chain=prerouting connection-mark="PRIO 4" \
new-packet-mark="PRIO 4" passthrough=yes
add action=jump chain=prerouting jump-target="finish process" packet-mark=\
"PRIO 4"
add action=mark-connection chain=prerouting comment=":: QoS - Prio 5 (Others)" \
new-connection-mark="PRIO 5" passthrough=yes
add action=mark-packet chain=prerouting connection-mark="PRIO 5" \
new-packet-mark="PRIO 5" passthrough=yes
add action=mark-connection chain=prerouting comment=\
":: QoS - Prio 7 (Http, Downloads >50mb)" connection-bytes=50000000-0 \
new-connection-mark="PRIO 7" passthrough=yes protocol=tcp
add action=mark-packet chain=prerouting connection-mark="PRIO 7" \
new-packet-mark="PRIO 7" passthrough=yes
add action=jump chain=prerouting jump-target="finish process" packet-mark=\
"PRIO 7"
add action=mark-connection chain=prerouting comment=\
":: QoS - YouTube Bandwidth" layer7-protocol=YouTube new-connection-mark=\
YouTube_Conn passthrough=yes
add action=mark-packet chain=prerouting connection-mark=YouTube_Conn \
new-packet-mark=YouTube passthrough=yes
add action=mark-connection chain=forward comment=\
"YouTube Limit - MacBook Pro LAN" connection-mark=YouTube_Conn dst-address=\
10.50.10.254 new-connection-mark=MBP_LAN_DConn passthrough=yes
add action=mark-packet chain=forward connection-mark=MBP_LAN_DConn \
new-packet-mark=MBP_LAN_Down passthrough=yes
add action=mark-connection chain=forward comment=\
"YouTube Limit - MacBook Pro WIFI" connection-mark=YouTube_Conn \
dst-address=10.50.10.253 new-connection-mark=MBP_WIFI_DConn passthrough=yes
add action=mark-packet chain=forward connection-mark=MBP_WIFI_DConn \
new-packet-mark=MBP_WIFI_Down passthrough=yes
add action=mark-connection chain=forward comment=\
"YouTube Limit - iPhone 8 Plus" connection-mark=YouTube_Conn dst-address=\
10.50.10.252 new-connection-mark="iPhone 8 Plus_DConn" passthrough=yes
add action=mark-packet chain=forward connection-mark="iPhone 8 Plus_DConn" \
new-packet-mark="iPhone 8 Plus_Down" passthrough=yes
add action=mark-connection chain=forward comment=\
"YouTube Limit - iPad Pro 10.5 Cellular" connection-mark=YouTube_Conn \
dst-address=10.50.10.250 new-connection-mark="iPad Pro 10.5 Cellular_DConn" \
passthrough=yes
add action=mark-packet chain=forward connection-mark=\
"iPad Pro 10.5 Cellular_DConn" new-packet-mark=\
"iPad Pro 10.5 Cellular_Down" passthrough=yes
add action=accept chain="finish process"
/ip firewall nat
add action=masquerade chain=srcnat comment=Internet out-interface="WAN1 PoE"
add action=redirect chain=dstnat comment="DNS Redirection" dst-port=53 \
protocol=tcp to-ports=53
add action=redirect chain=dstnat dst-port=53 protocol=udp to-ports=53
add action=redirect chain=dstnat comment="Web Cache Redirection" dst-port=80 \
protocol=tcp to-ports=8080
add action=dst-nat chain=dstnat comment="Router TL-WDR3600_Casa" dst-address=\
10.50.10.101 dst-port=9901 protocol=tcp to-addresses=192.168.1.1 to-ports=\
9901
add action=dst-nat chain=dstnat comment="Router TL-WDR3600_Kasami" dst-address=\
10.50.10.116 dst-port=9916 protocol=tcp to-addresses=192.168.1.1 to-ports=\
9916
add action=dst-nat chain=dstnat comment="Router TL-WR841_Jaimito" dst-address=\
10.50.10.118 dst-port=9918 protocol=tcp to-addresses=192.168.1.1 to-ports=\
9918
add action=dst-nat chain=dstnat comment="Router TL-WR841_Panchi_Old" \
dst-address=10.50.10.119 dst-port=9919 protocol=tcp to-addresses=\
192.168.1.1 to-ports=9919
add action=dst-nat chain=dstnat comment="Router TL-WDR3600_Soto" dst-address=\
10.50.10.120 dst-port=9920 protocol=tcp to-addresses=192.168.1.1 to-ports=\
9920
/ip ipsec policy
set 0 dst-address=0.0.0.0/0 src-address=0.0.0.0/0
/ip proxy
set cache-on-disk=yes cache-path=disk1 enabled=yes max-cache-object-size=\
131072KiB
/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
/ip ssh
set allow-none-crypto=yes forwarding-enabled=remote
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface="WAN1 PoE" type=external
add interface=LAN type=internal
/ipv6 dhcp-client
add add-default-route=yes interface="WAN1 PoE" request=address
/ipv6 route
add distance=1 gateway="WAN1 PoE"
/ppp l2tp-secret
add address=10.50.10.1/32 secret=***
/ppp secret
add name=PPTP password=*** profile=PPTP service=pptp
add name=L2TP password=*** profile=L2TP service=l2tp
/system clock
set time-zone-name=America/Narnia
/system identity
set name=RB450Gx4
/system ntp client
set enabled=yes primary-ntp=216.239.35.0 secondary-ntp=216.239.35.0
/system routerboard settings
set auto-upgrade=yes cpu-frequency=827MHz
/tool e-mail
set from="" start-tls=yes
/tool netwatch
/tool romon
set enabled=yes
If you see anything weird that could be fixed, I'll appreciate any advise for it.