Hi, I am new to networking and have recently set up a new RB5009 in my home, Using tutorials and forums I have learnt a lot about networking and routerOS. The network I set up has been working great so far and is by far the best setup i’ve tried. Previously had a (Netgear RX1000).
current setup:
BT Fiber 1000M Download / 100M Upload (ether1)> Mikrotik RB5009/switch > (ether2)Wifi AP Asus AC86U/NAS > (ether3)PS5
I would like to get a second opinion on my firewall,NAT, Mangle rules swell as my Queue configurations. Let me know if there is anything unnecessary or if i’m missing anything important.
2023-08-15 10:56:15 by RouterOS 7.10.2
# software id = x x x x
#
# model = RB5009UPr+S+
# serial number = x x x x
/interface bridge
add name="LAN Bridge"
/interface ethernet
set [ find default-name=ether1 ] comment=WAN
set [ find default-name=ether2 ] comment=LAN
set [ find default-name=ether3 ] comment=PS5
set [ find default-name=ether4 ] comment=Config
set [ find default-name=ether5 ] comment=Other
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 name=pppoe-out1 \
service-name="BT Fibre PPPoe (1000M/100M)" use-peer-dns=yes user=\
x x x x
/interface list
add name=WAN
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.x.10-192.168.x.254
add name=dhcp_pool2 ranges=192.168.x.10-192.168.x.254
add name=dhcp_pool3 ranges=192.168.x.10-192.168.x.254
/ip dhcp-server
add address-pool=dhcp_pool3 interface="LAN Bridge" lease-time=1d name=\
"LAN dhcp"
/queue simple
add disabled=yes max-limit=50M/200M name="PS5 Default" target=192.168.x.254/32 \
time=0s-1d,sun,mon,tue,wed,thu,fri,sat
/queue type
add cake-diffserv=besteffort cake-overhead-scheme=raw kind=cake name=\
"CakeConfig - Defaults"
add cake-ack-filter=filter cake-atm=ptm cake-bandwidth=80.0Mbps cake-diffserv=\
besteffort cake-mpu=88 cake-nat=yes cake-overhead=40 kind=cake name=\
"CakeConfig - Upload"
add cake-atm=ptm cake-bandwidth=1000.0Mbps cake-diffserv=besteffort cake-mpu=88 \
cake-nat=yes cake-overhead=40 cake-wash=yes kind=cake name=\
"CakeConfig - Download"
add kind=fq-codel name="FQ Codel"
add cake-nat=yes cake-wash=yes kind=cake name="Cake Download"
add cake-nat=yes kind=cake name="Cake Upload"
add kind=cake name="Cake Default"
/queue simple
add max-limit=50M/200M name="ps5 cake" priority=1/1 queue=\
"Cake Upload/Cake Download" target=192.168.x.254/32 time=\
0s-1d,sun,mon,tue,wed,thu,fri,sat total-queue="Cake Default"
add disabled=yes max-limit=80M/1G name="All Bandwidth" queue=\
"Cake Upload/Cake Download" target=192.168.x.0/24 time=\
0s-1d,sun,mon,tue,wed,thu,fri,sat total-queue="Cake Default"
add disabled=yes max-limit=50M/200M name=PS5 parent="All Bandwidth" priority=\
1/1 queue="Cake Upload/Cake Download" target=192.168.x.254/32 time=\
0s-1d,sun,mon,tue,wed,thu,fri,sat total-queue="Cake Default"
add disabled=yes max-limit=50M/200M name="ps5 fq codel" priority=1/1 queue=\
"FQ Codel/FQ Codel" target=192.168.x.254/32 time=\
0s-1d,sun,mon,tue,wed,thu,fri,sat
/queue tree
add disabled=yes max-limit=1100M name="All Bandwidth" parent=global priority=1 \
queue="Cake Default"
add disabled=yes max-limit=1G name=Download packet-mark=client-dw-pk parent=\
"All Bandwidth" priority=2 queue="Cake Download"
add disabled=yes max-limit=1G name="http download" packet-mark=http-dw-pk \
parent=Download priority=1 queue="Cake Download"
add disabled=yes max-limit=500M name="other download" packet-mark=other-dw-pk \
parent=Download priority=6 queue="Cake Download"
add disabled=yes max-limit=100M name=Upload packet-mark=client-up-pk parent=\
"All Bandwidth" queue="Cake Upload"
add disabled=yes max-limit=100M name="http upload" packet-mark=http-up-pk \
parent=Upload priority=1 queue="Cake Upload"
add disabled=yes max-limit=50M name="other upload" packet-mark=other-up-pk \
parent=Upload priority=6 queue="Cake Upload"
/interface bridge port
add bridge="LAN Bridge" interface=ether2
add bridge="LAN Bridge" interface=ether3
add bridge="LAN Bridge" interface=ether4
add bridge="LAN Bridge" interface=ether5
/ip neighbor discovery-settings
set discover-interface-list=!dynamic
/ipv6 settings
set disable-ipv6=yes
/interface list member
add interface=pppoe-out1 list=WAN
add interface="LAN Bridge" list=LAN
/ip address
add address=192.168.x.1/24 interface="LAN Bridge" network=192.168.x.0
/ip dhcp-client
add interface="LAN Bridge"
/ip dhcp-server lease
add address=192.168.x.254 client-id=1:xx:xx:xx:xx:xx:xx mac-address=\
Xx:xx:xx:xx:xx:xx server="LAN dhcp"
/ip dhcp-server network
add address=192.168.x.0/24 dns-server=8.8.8.8,1.1.1.1 gateway=192.168.x.1 \
netmask=24
/ip dns
set servers=8.8.8.8,1.1.1.1
/ip firewall address-list
add address=0.0.0.0/8 comment="Self-Identification [RFC 3330]" list=Bogons
add address=10.0.0.0/8 comment="Private[RFC 1918] - CLASS A # Check if you need \
this subnet before enable it" list=Bogons
add address=127.0.0.0/8 comment="Loopback [RFC 3330]" list=Bogons
add address=169.254.0.0/16 comment="Link Local [RFC 3330]" list=Bogons
add address=172.16.0.0/12 comment="Private[RFC 1918] - CLASS B # Check if you ne\
ed this subnet before enable it" list=Bogons
add address=192.0.2.0/24 comment="Reserved - IANA - TestNet1" list=Bogons
add address=192.88.99.0/24 comment="6to4 Relay Anycast [RFC 3068]" list=Bogons
add address=198.18.0.0/15 comment="NIDB Testing" list=Bogons
add address=198.51.100.0/24 comment="Reserved - IANA - TestNet2" list=Bogons
add address=203.0.113.0/24 comment="Reserved - IANA - TestNet3" list=Bogons
add address=224.0.0.0/4 comment=\
"MC, Class D, IANA # Check if you need this subnet before enable it" list=\
Bogons
add address=172.xx.xx.0/24 list="MGMT Ranges"
add address=192.168.x.0/24 list="MGMT Ranges"
add address=172.xx.xx.xx list="LAN Range"
/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=reject chain=input comment="start of TKJS basic rules" in-interface=\
ether1 reject-with=icmp-network-unreachable src-address-list="!MGMT Ranges"
add action=accept chain=forward out-interface=ether1 port=80,443,8080,53 \
protocol=tcp src-address-list="LAN Range"
add action=accept chain=forward out-interface=ether1 port=53 protocol=udp \
src-address-list="LAN Range"
add action=accept chain=forward out-interface=ether1 protocol=icmp \
src-address-list="LAN Range"
add action=accept chain=forward comment="defconf: accept established,related" \
connection-state=established,related
add action=drop chain=forward comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input port=69 protocol=udp
add action=accept chain=forward port=69 protocol=udp
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface=ether1
add action=drop chain=forward comment="Drop to bogon list" dst-address-list=\
Bogons
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
disabled=yes ipsec-policy=out,ipsec
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked disabled=yes
add action=drop chain=forward comment="defconf: drop invalid" connection-state=\
invalid disabled=yes
add action=accept chain=input comment="start of network berg rules" disabled=\
yes protocol=icmp
add action=accept chain=input connection-state=established disabled=yes
add action=accept chain=input connection-state=related disabled=yes
add action=accept chain=forward comment="PS5 Ghosts" disabled=yes dst-port=\
3074,3478-3479,49152-65535 protocol=udp
add action=accept chain=forward disabled=yes dst-port=0,443,1935,3478-3480 \
protocol=tcp
/ip firewall mangle
add action=mark-packet chain=prerouting disabled=yes dst-port=\
80,0,443,8080,53,1935,3478-3480 new-packet-mark=Gaming passthrough=yes \
protocol=tcp
add action=mark-connection chain=forward comment=cliient-dw-con disabled=yes \
in-interface=ether1 new-connection-mark=cliient-dw-con passthrough=yes
add action=mark-packet chain=forward comment=client-dw-pk connection-mark=\
cliient-dw-con disabled=yes new-packet-mark=client-dw-pk passthrough=yes
add action=mark-connection chain=prerouting comment=client-up-con disabled=yes \
in-interface="LAN Bridge" new-connection-mark=client-up-con passthrough=yes
add action=mark-packet chain=prerouting comment=client-up-pk connection-mark=\
client-up-con disabled=yes new-packet-mark=client-up-pk passthrough=yes
add action=mark-packet chain=forward comment=http-dw-pk disabled=yes \
new-packet-mark=http-dw-pk packet-mark=client-dw-pk passthrough=no port=\
80,443 protocol=tcp
add action=mark-packet chain=forward comment=http-up-pk disabled=yes \
new-packet-mark=http-up-pk packet-mark=client-up-pk passthrough=no port=\
80,443 protocol=tcp
add action=mark-packet chain=forward comment=other-dw-pk disabled=yes \
new-packet-mark=other-dw-pk packet-mark=client-dw-pk passthrough=no
add action=mark-packet chain=forward comment=other-up-pk disabled=yes \
new-packet-mark=other-up-pk packet-mark=client-up-pk passthrough=no
/ip firewall nat
add action=masquerade chain=srcnat
add action=dst-nat chain=dstnat protocol=icmp to-addresses=192.168.x.1
add action=masquerade chain=srcnat out-interface=ether1
add action=dst-nat chain=dstnat comment=ps5 disabled=yes dst-port=80 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.x.254 to-ports=0
add action=dst-nat chain=dstnat comment=ps5 disabled=yes dst-port=443 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.x.254 to-ports=0
add action=dst-nat chain=dstnat comment=ps5 disabled=yes dst-port=465 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.x.254 to-ports=0
add action=dst-nat chain=dstnat comment=ps5 disabled=yes dst-port=993 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.x.254 to-ports=0
add action=dst-nat chain=dstnat comment=ps5 disabled=yes dst-port=3478 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.x.254 to-ports=0
add action=dst-nat chain=dstnat comment=ps5 disabled=yes dst-port=3479 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.x.254 to-ports=0
add action=dst-nat chain=dstnat comment=ps5 disabled=yes dst-port=3480 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.x.254 to-ports=0
add action=dst-nat chain=dstnat comment=ps5 disabled=yes dst-port=5223 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.x.254 to-ports=0
add action=dst-nat chain=dstnat comment=ps5 disabled=yes dst-port=8080 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.x.254 to-ports=0
add action=dst-nat chain=dstnat comment=ps5 disabled=yes dst-port=1935 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.x.254 to-ports=0
add action=dst-nat chain=dstnat comment=ps5 disabled=yes dst-port=0 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.x.254 to-ports=0
add action=dst-nat chain=dstnat comment=ps5 disabled=yes dst-port=3074 \
in-interface-list=WAN protocol=udp to-addresses=192.168.x.254 to-ports=0
add action=dst-nat chain=dstnat comment=ps5 disabled=yes dst-port=3478 \
in-interface-list=WAN protocol=udp to-addresses=192.168.x.254 to-ports=0
add action=dst-nat chain=dstnat comment=ps5 disabled=yes dst-port=3479 \
in-interface-list=WAN protocol=udp to-addresses=192.168.x.254 to-ports=0
add action=dst-nat chain=dstnat comment=ps5 disabled=yes dst-port=49152-65535 \
in-interface-list=WAN protocol=udp to-addresses=192.168.x.254 to-ports=0
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh address=172.xx.x.x,192.168.x.x/24 port=x
set api disabled=yes
set api-ssl disabled=yes
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=pppoe-out1 type=external
add interface="LAN Bridge" type=internal
/system clock
set time-zone-name=Europe/London
/system identity
set name=xxxx
/system note
set show-at-login=no
/system ntp client
set enabled=yes
/system ntp client servers
add address=pool.ntp.org
add address=asia.pool.ntp.org
/system routerboard settings
set auto-upgrade=yes
/system scheduler
add interval=1d name="Daily Reboot" on-event="system reboot" policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=2023-08-13 start-time=06:00:00
Thank you for reading this far and apologies for not knowing the command prompts for getting this information, which is why i’m uploading pictures. I f there is any additional info I can provide let me know, also if there is a command prompt to get said info.
My goal is to get this network set up for competitive FPS gaming and for it be as secure as can be.
later I will learn how to setup Wiregaurd VPN and how to port forward properly for an open NAT, but ill leave that for another post.
Thank you,
Elias.