For both routers.
/export file=anynameyouwish ( minus router serial number, any public WANIP information, keys, etc..)
Mikrotik 1 (Client)
2024-07-22 20:16:28 by RouterOS 7.14.3
software id = redacted
model = CCR2004-16G-2S+
serial number = redacted
/interface bridge
add disabled=yes name=Customer port-cost-mode=short
add name=IKE2
add name=Management port-cost-mode=short
add name=Redtone-br port-cost-mode=short
/interface ethernet
set [ find default-name=ether6 ] comment=ether6 name=Redtone
set [ find default-name=ether1 ] comment=“WAN ports 1-8”
set [ find default-name=ether10 ] comment=“OLT data ports 10-12” disabled=yes
set [ find default-name=ether11 ] disabled=yes
set [ find default-name=ether12 ] comment=“Management ports 12-16”
set [ find default-name=sfp-sfpplus1 ] comment=“OLT-A,B,C,D,E uplink”
/interface wireguard
add listen-port=13299 mtu=1420 name=CJ1-Internet
add disabled=yes listen-port=13233 mtu=1420 name=to-Bintang
add disabled=yes listen-port=13232 mtu=1420 name=to-Chambers
add disabled=yes listen-port=13234 mtu=1420 name=to-Trion1
add disabled=yes listen-port=13235 mtu=1420 name=to-Trion2
add disabled=yes listen-port=13231 mtu=1420 name=to-YouthCity
/interface vlan
add interface=ether1 name=vlan500 vlan-id=500
add interface=ether3 name=vlan500-2 vlan-id=500
add interface=ether5 name=vlan500-3 vlan-id=500
add interface=sfp-sfpplus2 name=vlan500-4 vlan-id=500
/interface pppoe-client
add add-default-route=yes comment=ether9 default-route-distance=8 interface=
vlan500-4 name=Unifi-2Gbps user=superliteelec002@unifibiz
/interface ovpn-client
add certificate=mvertica.crt_0 cipher=aes128-cbc connect-to=
origintechlab.splynx.app mac-address=02:48:AB:D0:40:73 name=Ovpn-Splynx
protocol=udp user=mvertica
/interface list
add name=WAN
add name=LAN
add name=PPPoE
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip ipsec policy group
add name=ike2-policies
/ip ipsec profile
add enc-algorithm=aes-256,aes-192,aes-128 hash-algorithm=sha256 name=ike2
/ip ipsec peer
add exchange-mode=ike2 name=ike2 passive=yes profile=ike2
/ip ipsec proposal
add auth-algorithms=sha256,sha1 lifetime=8h name=ike2 pfs-group=none
/ip pool
add name=dhcp_pool0 ranges=192.168.88.99-192.168.88.199
add name=Customer_Pool ranges=172.16.252.200-172.16.255.200
add name=vpn_pool0 ranges=192.168.99.100-192.168.99.110
/ip dhcp-server
add address-pool=dhcp_pool0 interface=Management name=dhcp1
/ip ipsec mode-config
add address-pool=vpn_pool0 address-prefix-length=32 name=ike2-conf
split-include=0.0.0.0/0 static-dns=192.168.99.1,8.8.4.4 system-dns=no
/ip smb users
set [ find default=yes ] disabled=yes
/port
set 0 name=serial0
set 1 name=serial1
/ppp profile
add address-list=GPON_Customer dns-server=8.8.8.8,8.8.4.4 interface-list=
PPPoE local-address=172.16.252.1 name=GPON remote-address=Customer_Pool
use-compression=no use-mpls=no
add address-list=Unifi change-tcp-mss=yes name=Unifi
add address-list=TIME change-tcp-mss=yes name=TIME
add address-list=Unifi-2 change-tcp-mss=yes name=Unifi-2
add address-list=TIME-2 change-tcp-mss=yes name=TIME-2
add address-list=Unifi-3 change-tcp-mss=yes name=Unifi-3
add address-list=TIME-3 change-tcp-mss=yes name=TIME-3
add address-list=TIME-4 change-tcp-mss=yes name=TIME-4
/interface pppoe-client
add add-default-route=yes comment=ether2 default-route-distance=2 interface=
ether2 name=TIME-1Gbps profile=TIME user=enquiry538@timebb
add add-default-route=yes comment=ether4 default-route-distance=4 interface=
ether4 name=TIME-1Gbps-2 profile=TIME-2 user=jolene93@timebb
add add-default-route=yes comment=ether7 default-route-distance=6 interface=
ether7 name=TIME-1Gbps-3 profile=TIME-3 user=jolene850@timebb
add add-default-route=yes comment=ether8 default-route-distance=7 interface=
ether8 name=TIME-1Gbps-4 profile=TIME-4 user=enquiry522@timebb
add add-default-route=yes comment=ether1 disabled=no interface=vlan500 name=
Unifi-1Gbps profile=Unifi user=originwifi1@unifibiz
add add-default-route=yes comment=ether3 default-route-distance=3 disabled=no
interface=vlan500-2 name=Unifi-1Gbps-2 profile=Unifi-2 user=
originwifi@unifibiz
add add-default-route=yes comment=ether5 default-route-distance=5 disabled=no
interface=vlan500-3 name=Unifi-1Gbps-3 profile=Unifi-3 user=
uptrend_media@unifibiz
/routing ospf instance
add disabled=no name=ospf-instance-1
/routing ospf area
add disabled=no instance=ospf-instance-1 name=backbone
/routing table
add disabled=no fib name=Customer
add fib name=to_Unifi
add disabled=no fib name=to_TIME
add disabled=no fib name=to_Unifi-2
add disabled=no fib name=to_TIME-2
add disabled=no fib name=to_Unifi-3
add disabled=no fib name=to_Redtone
add disabled=no fib name=to_TIME-3
add disabled=no fib name=to_TIME-4
add disabled=no fib name=to_Unifi-2Gbps
/user-manager limitation
add name=100Mbps rate-limit-burst-rx=110000000B
rate-limit-burst-threshold-rx=128000000B rate-limit-burst-threshold-tx=
128000000B rate-limit-burst-time-rx=10s rate-limit-burst-time-tx=10s
rate-limit-burst-tx=110000000B rate-limit-min-rx=90000000B
rate-limit-min-tx=90000000B rate-limit-rx=100000000B rate-limit-tx=
100000000B uptime-limit=4w2d
add name=200Mbps rate-limit-burst-rx=210000000B
rate-limit-burst-threshold-rx=256000000B rate-limit-burst-threshold-tx=
256000000B rate-limit-burst-time-rx=10s rate-limit-burst-time-tx=10s
rate-limit-burst-tx=210000000B rate-limit-min-rx=190000000B
rate-limit-min-tx=190000000B rate-limit-rx=200000000B rate-limit-tx=
200000000B uptime-limit=4w2d
add name=300Mbps rate-limit-burst-rx=310000000B
rate-limit-burst-threshold-rx=320000000B rate-limit-burst-threshold-tx=
256000000B rate-limit-burst-time-rx=10s rate-limit-burst-time-tx=10s
rate-limit-burst-tx=210000000B rate-limit-min-rx=290000000B
rate-limit-min-tx=190000000B rate-limit-rx=300000000B rate-limit-tx=
200000000B uptime-limit=4w2d
/user-manager profile
add name=GPON_100Mbps name-for-users=GPON_100Mbps starts-when=first-auth
validity=4w2d
add name=GPON_200Mbps name-for-users=GPON_200Mbps starts-when=first-auth
validity=4w2d
add name=GPON_300Mbps name-for-users=GPON_300Mbps starts-when=first-auth
validity=4w2d
/user-manager user group
add inner-auths=ttls-pap,ttls-chap,ttls-mschap1,ttls-mschap2,peap-mschap2
name=VPN outer-auths=
pap,chap,mschap1,mschap2,eap-tls,eap-ttls,eap-peap,eap-mschap2
/zerotier
set zt1 comment=“ZeroTier Central controller - https://my.zerotier.com/ ”
disabled=yes disabled=yes name=zt1 port=9993
/interface bridge port
add bridge=Customer disabled=yes interface=ether9 internal-path-cost=10
path-cost=10
add bridge=Customer disabled=yes interface=ether10 internal-path-cost=10
path-cost=10
add bridge=Customer disabled=yes interface=ether11 internal-path-cost=10
path-cost=10
add bridge=Management interface=ether12 internal-path-cost=10 path-cost=10
add bridge=Management interface=sfp-sfpplus1 internal-path-cost=10 path-cost=
10
add bridge=Management disabled=yes interface=sfp-sfpplus2 internal-path-cost=
10 path-cost=10
add bridge=Management interface=ether13 internal-path-cost=10 path-cost=10
add bridge=Management interface=ether14 internal-path-cost=10 path-cost=10
add bridge=Management interface=ether15 internal-path-cost=10 path-cost=10
add bridge=Management interface=ether16 internal-path-cost=10 path-cost=10
add bridge=Redtone-br interface=Redtone internal-path-cost=10 path-cost=10
add bridge=Redtone-br interface=*20 internal-path-cost=10 path-cost=10
/interface bridge settings
set use-ip-firewall=yes use-ip-firewall-for-pppoe=yes
use-ip-firewall-for-vlan=yes
/ip firewall connection tracking
set udp-timeout=10s
/interface detect-internet
set internet-interface-list=WAN wan-interface-list=WAN
/interface list member
add interface=Unifi-1Gbps list=WAN
add interface=Customer list=LAN
add interface=Unifi-1Gbps-2 list=WAN
add interface=TIME-1Gbps list=WAN
add interface=Unifi-1Gbps-3 list=WAN
add interface=TIME-1Gbps-2 list=WAN
add interface=Redtone list=WAN
add interface=Management list=LAN
add interface=Redtone-br list=WAN
add interface=TIME-1Gbps-3 list=WAN
add interface=Unifi-2Gbps list=WAN
/interface pppoe-server server
add authentication=mschap2 default-profile=GPON interface=Customer
keepalive-timeout=30 one-session-per-host=yes service-name=GPON
/interface wireguard peers
add allowed-address=0.0.0.0/0 disabled=yes endpoint-address=
redacted endpoint-port=13231 interface=to-YouthCity
public-key=“GkmePKK6jc5LZh9kbpYAEK+2/0k5oRfdHLYSzAxod0M=”
add allowed-address=0.0.0.0/0 disabled=yes endpoint-address=
redacted endpoint-port=13231 interface=to-Chambers
public-key=“FAGwkn1eM+dK0KlxtI/3QI/4YCaEVmJkawDvs2aIARM=”
add allowed-address=0.0.0.0/0 disabled=yes endpoint-address=
redacted endpoint-port=13231 interface=to-Bintang
public-key=“macz3FODP9zu1rKalkMeeqNF9Pj1dOtHgxMWVJat3kQ=”
add allowed-address=0.0.0.0/0 disabled=yes endpoint-address=
redacted endpoint-port=13231 interface=to-Trion1
public-key=“rPeXzh6oeeCQXgPVc7qpzmnlZketDLZTNj9PTf7qD1c=”
add allowed-address=0.0.0.0/0 disabled=yes endpoint-address=
redacted endpoint-port=13235 interface=to-Trion2
public-key=“m8k0h5UQr3Bw3WaY8i80vnHzRWGKmSfwk6fzJvzZnhw=”
add allowed-address=0.0.0.0/0 endpoint-address=redacted
endpoint-port=13231 interface=CJ1-Internet public-key=
“O+Mu1AiWcGZ3ME2wEGEff9M7uVb0pWaib9FSnvJEgm4=”
/ip address
add address=192.168.88.1/24 interface=Management network=192.168.88.0
add address=192.1.1.1/24 disabled=yes interface=to-YouthCity network=
192.1.1.0
add address=192.2.2.1/24 disabled=yes interface=to-Chambers network=192.2.2.0
add address=192.3.3.1/24 disabled=yes interface=to-Bintang network=192.3.3.0
add address=192.168.99.1/24 interface=IKE2 network=192.168.99.0
add address=192.4.4.1/24 disabled=yes interface=to-Trion1 network=192.4.4.0
add address=192.5.5.1/24 disabled=yes interface=to-Trion2 network=192.5.5.0
add address=172.254.0.2/30 interface=CJ1-Internet network=172.254.0.0
/ip cloud
set ddns-enabled=yes
/ip dhcp-client
add disabled=yes interface=ether7
/ip dhcp-server network
add address=192.168.88.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip dns static
add address=192.168.88.1 name=mvertica.otl
add address=192.168.88.2 name=mverticap.otl
add address=192.168.89.1 name=youth.otl
add address=192.168.90.1 name=chambers.otl
add address=192.168.90.2 name=chambersp.otl
add address=192.168.91.1 name=bintang.otl
add address=192.168.91.2 name=bintangp.otl
add address=192.168.92.1 name=trion1.otl
add address=192.168.92.2 name=trion1p.otl
add address=192.168.93.1 name=trion2.otl
add address=192.168.93.2 name=trion2p.otl
/ip firewall address-list
add address=192.168.88.0/24 list=Management_Access
add address=192.168.99.0/24 list=Management_Access
add address=192.168.88.0/24 list=LANs
add address=192.168.89.0/24 list=Management_Access
add address=192.1.1.0/24 list=Management_Access
add address=172.16.252.0/22 list=GPON_Users
add address=172.16.252.0/22 list=LANs
add address=192.168.90.0/24 list=Management_Access
add address=192.168.91.0/24 list=Management_Access
/ip firewall filter
add action=jump chain=input comment=“Check port knock” icmp-options=8:0-255
jump-target=knock packet-size=!0-99 protocol=icmp
add action=accept chain=input comment=“accept established,related connection”
connection-state=established,related
add action=accept chain=input comment=“accept icmp packets” protocol=icmp
add action=accept chain=input comment=“accept wireguard connection” dst-port=
13231-13235,13299 in-interface-list=WAN protocol=udp
add action=accept chain=input comment=“accept ipsec connection” dst-port=
500,4500 in-interface=Unifi-1Gbps protocol=udp
add action=accept chain=input comment=“accept ipsec connection” dst-port=
500,4500 in-interface=Unifi-1Gbps-2 protocol=udp
add action=accept chain=input comment=“accept ipsec connection” dst-port=
500,4500 in-interface=Unifi-1Gbps-3 protocol=udp
TIME-1Gbps not ready
add action=accept chain=input comment=“accept ipsec connection” dst-port=
500,4500 in-interface=TIME-1Gbps protocol=udp
TIME-1Gbps-2 not ready
add action=accept chain=input comment=“accept ipsec connection” dst-port=
500,4500 in-interface=TIME-1Gbps-2 protocol=udp
TIME-1Gbps-3 not ready
add action=accept chain=input comment=“accept ipsec connection” dst-port=
500,4500 in-interface=TIME-1Gbps-3 protocol=udp
TIME-1Gbps-4 not ready
add action=accept chain=input comment=“accept ipsec connection” dst-port=
500,4500 in-interface=TIME-1Gbps-4 protocol=udp
Unifi-2Gbps not ready
add action=accept chain=input comment=“accept ipsec connection” dst-port=
500,4500 in-interface=Unifi-2Gbps protocol=udp
add action=accept chain=input comment=“accept ipsec connection” dst-port=
500,4500 in-interface=Redtone-br protocol=udp
add action=add-src-to-address-list address-list=Management_Access
address-list-timeout=15m chain=input comment=
“port knock with icmp count 15 times” icmp-options=8:15 protocol=icmp
add action=accept chain=input comment=
“accept connection from management subnets” in-interface=to-YouthCity
add action=accept chain=input comment=
“accept connection from management subnets” in-interface=to-Chambers
add action=accept chain=input comment=
“accept connection from management subnets” in-interface=to-Bintang
add action=accept chain=input comment=“ACCEPT TLS after knock” dst-port=443
protocol=tcp src-address-list=KNOCK-SUCCESS
add action=accept chain=input comment=“ACCEPT SSH after knock” dst-port=8291
protocol=tcp src-address-list=KNOCK-SUCCESS
add action=drop chain=input comment=“drop everything except from Management”
in-interface=Unifi-1Gbps src-address-list=!Management_Access
add action=drop chain=input comment=“drop everything except from Management”
in-interface=Unifi-1Gbps-2 src-address-list=!Management_Access
add action=drop chain=input comment=“drop everything except from Management”
in-interface=Unifi-1Gbps-3 src-address-list=!Management_Access
TIME-1Gbps not ready
add action=drop chain=input comment=“drop everything except from Management”
in-interface=TIME-1Gbps src-address-list=!Management_Access
TIME-1Gbps-2 not ready
add action=drop chain=input comment=“drop everything except from Management”
in-interface=TIME-1Gbps-2 src-address-list=!Management_Access
TIME-1Gbps-3 not ready
add action=drop chain=input comment=“drop everything except from Management”
in-interface=TIME-1Gbps-3 src-address-list=!Management_Access
add action=drop chain=input comment=“drop everything except from Management”
in-interface=Redtone-br src-address-list=!Management_Access
add action=accept chain=forward comment=“forward established,related”
connection-state=established,related
add action=drop chain=forward comment=“drop invalid” connection-state=invalid
add action=return chain=knock comment=“KNOCK FAILURE return”
src-address-list=KNOCK-FAILURE
add action=add-src-to-address-list address-list=KNOCK-SUCCESS
address-list-timeout=1h chain=knock comment=“KNOCK 3rd - success 600”
packet-size=628 src-address-list=KNOCK2
add action=return chain=knock comment=“KNOCK 3rd - success return”
src-address-list=KNOCK-SUCCESS
add action=add-src-to-address-list address-list=KNOCK-FAILURE
address-list-timeout=1m chain=knock comment=“KNOCK 3rd - failure”
src-address-list=KNOCK2
add action=return chain=knock comment=“KNOCK 3rd - failure return”
src-address-list=KNOCK-FAILURE
add action=add-src-to-address-list address-list=KNOCK2 address-list-timeout=
1m chain=knock comment=“KNOCK 2nd - success 500” packet-size=528
src-address-list=KNOCK1
add action=return chain=knock comment=“KNOCK 2nd - success return”
src-address-list=KNOCK2
add action=add-src-to-address-list address-list=KNOCK-FAILURE
address-list-timeout=1m chain=knock comment=“KNOCK 2nd - failure”
src-address-list=KNOCK1
add action=return chain=knock comment=“KNOCK 2nd - failure return”
src-address-list=KNOCK-FAILURE
add action=add-src-to-address-list address-list=KNOCK1 address-list-timeout=
1m chain=knock comment=“KNOCK 1st - success 400” packet-size=428
add action=return chain=knock comment=“KNOCK 1st - success return”
src-address-list=KNOCK1
add action=add-src-to-address-list address-list=KNOCK-FAILURE
address-list-timeout=1m chain=knock comment=“KNOCK 1st - failure”
/ip firewall mangle
add action=accept chain=prerouting comment=“accept connection from CJ1”
dst-address=172.254.0.0/24 src-address=192.168.88.0/24
add action=accept chain=prerouting dst-address=172.255.0.0/24 src-address=
192.168.88.0/24
add action=accept chain=prerouting comment=
“accept connection for Youth Condo Nilai” dst-address=192.168.89.0/24
src-address=192.168.88.0/24
add action=accept chain=prerouting comment=
“accept connection for Chambers Residence” dst-address=192.168.90.0/24
src-address=192.168.88.0/24
add action=accept chain=prerouting comment=
“accept connection for Bintang Residence” dst-address=192.168.91.0/24
src-address=192.168.88.0/24
add action=accept chain=prerouting comment=“accept connection for TRION1”
dst-address=192.168.92.0/24 src-address=192.168.88.0/24
add action=accept chain=prerouting comment=“accept connection for TRION2”
dst-address=192.168.93.0/24 src-address=192.168.88.0/24
add action=accept chain=prerouting dst-address=192.1.1.0/24 src-address=
192.168.88.0/24
add action=accept chain=prerouting dst-address=192.2.2.0/24 src-address=
192.168.88.0/24
add action=accept chain=prerouting dst-address=192.3.3.0/24 src-address=
192.168.88.0/24
add action=accept chain=prerouting dst-address=192.4.4.0/24 src-address=
192.168.88.0/24
add action=accept chain=prerouting dst-address=192.5.5.0/24 src-address=
192.168.88.0/24
add action=accept chain=prerouting comment=“accept connection for dst-nat”
dst-address=10.250.32.0/24 src-address=192.168.88.2
add action=accept chain=prerouting comment=“accept connection for dst-nat”
dst-address=10.250.32.1 src-address=172.16.252.0/22
add action=accept chain=prerouting dst-address=172.254.0.0/24 src-address=
172.16.252.0/22
add action=accept chain=prerouting comment=“accept connection for dst-nat”
disabled=yes dst-address-list=!LANs src-address=192.168.88.2
add action=accept chain=prerouting in-interface=Unifi-1Gbps
TIME-1Gbps not ready
add action=accept chain=prerouting in-interface=TIME-1Gbps
add action=accept chain=prerouting in-interface=Unifi-1Gbps-2
TIME-1Gbps-2 not ready
add action=accept chain=prerouting in-interface=TIME-1Gbps-2
add action=accept chain=prerouting in-interface=Unifi-1Gbps-3
TIME-1Gbps-3 not ready
add action=accept chain=prerouting in-interface=TIME-1Gbps-3
TIME-1Gbps-4 not ready
add action=accept chain=prerouting in-interface=TIME-1Gbps-4
add action=accept chain=prerouting disabled=yes in-interface=Redtone-br
add action=mark-connection chain=prerouting comment=new dst-address-list=
!LANs in-interface-list=LAN new-connection-mark=Unifi_conn passthrough=
yes per-connection-classifier=src-address:3/0
add action=mark-connection chain=prerouting dst-address-list=!LANs
in-interface-list=LAN new-connection-mark=Unifi-2_conn passthrough=yes
per-connection-classifier=src-address:3/1
add action=mark-connection chain=prerouting dst-address-list=!LANs
in-interface-list=LAN new-connection-mark=Unifi-3_conn passthrough=yes
per-connection-classifier=src-address:3/2
add action=mark-connection chain=prerouting comment=current disabled=yes
dst-address-list=!LANs in-interface-list=LAN new-connection-mark=
Unifi_conn passthrough=yes per-connection-classifier=src-address:7/0
add action=mark-connection chain=prerouting disabled=yes dst-address-list=
!LANs in-interface-list=LAN new-connection-mark=TIME_conn passthrough=yes
per-connection-classifier=src-address:7/1
add action=mark-connection chain=prerouting disabled=yes dst-address-list=
!LANs in-interface-list=LAN new-connection-mark=Unifi-2_conn passthrough=
yes per-connection-classifier=src-address:7/2
add action=mark-connection chain=prerouting disabled=yes dst-address-list=
!LANs in-interface-list=LAN new-connection-mark=TIME-2_conn passthrough=
yes per-connection-classifier=src-address:7/3
add action=mark-connection chain=prerouting disabled=yes dst-address-list=
!LANs in-interface-list=LAN new-connection-mark=Unifi-3_conn passthrough=
yes per-connection-classifier=src-address:7/4
add action=mark-connection chain=prerouting disabled=yes dst-address-list=
!LANs in-interface-list=LAN new-connection-mark=TIME-3_conn passthrough=
yes per-connection-classifier=src-address:7/5
add action=mark-connection chain=prerouting disabled=yes dst-address-list=
!LANs in-interface-list=LAN new-connection-mark=TIME-4_conn passthrough=
yes per-connection-classifier=src-address:7/6
add action=mark-routing chain=prerouting comment=current connection-mark=
Unifi_conn in-interface-list=LAN new-routing-mark=to_Unifi passthrough=
yes
add action=mark-routing chain=prerouting connection-mark=TIME_conn
in-interface-list=LAN new-routing-mark=to_TIME passthrough=yes
add action=mark-routing chain=prerouting connection-mark=Unifi-2_conn
in-interface-list=LAN new-routing-mark=to_Unifi-2 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=TIME-2_conn
in-interface-list=LAN new-routing-mark=to_TIME-2 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=Unifi-3_conn
in-interface-list=LAN new-routing-mark=to_Unifi-3 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=TIME-3_conn
in-interface-list=LAN new-routing-mark=to_TIME-3 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=TIME-4_conn
in-interface-list=LAN new-routing-mark=to_TIME-4 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=Redtone_conn
disabled=yes in-interface-list=LAN new-routing-mark=to_Redtone
passthrough=yes
add action=mark-routing chain=prerouting comment=CJ1-PBR disabled=yes
in-interface-list=LAN new-routing-mark=Customer passthrough=yes
src-address=172.16.252.0/22
add action=mark-routing chain=prerouting comment=
“Speedtest redirect to main line” disabled=yes dst-address-list=Speedtest
new-routing-mark=to_Unifi passthrough=yes src-address-list=GPON_Users
/ip firewall nat
add action=masquerade chain=srcnat disabled=yes dst-address-list=
172.16.252.100 out-interface=Customer src-address-list=192.168.88.0/24
add action=dst-nat chain=dstnat comment=
“winbox dst-nat access to 192.168.88.2” dst-port=58291 in-interface-list=
WAN protocol=tcp to-addresses=192.168.88.2 to-ports=8291
add action=dst-nat chain=dstnat comment=
“winbox dst-nat access to 192.168.88.2” dst-port=1812 in-interface-list=
WAN protocol=udp to-addresses=192.168.88.2 to-ports=1812
add action=dst-nat chain=dstnat comment=
“winbox dst-nat access to 192.168.88.2” dst-port=1813 in-interface-list=
WAN protocol=udp to-addresses=192.168.88.2 to-ports=1813
add action=dst-nat chain=dstnat comment=
“winbox dst-nat access to 192.168.88.2” disabled=yes dst-port=8728
in-interface-list=WAN protocol=tcp to-addresses=192.168.88.2 to-ports=
8728
add action=masquerade chain=srcnat disabled=yes out-interface=to-Bintang
add action=masquerade chain=srcnat comment=
“masquerade Customer to Unifi-1Gbps” out-interface=Unifi-1Gbps
add action=masquerade chain=srcnat comment=
“masquerade Customer to Unifi-1Gbps-2” out-interface=Unifi-1Gbps-2
add action=masquerade chain=srcnat comment=
“masquerade Customer to Unifi-1Gbps-3” out-interface=Unifi-1Gbps-3
Unifi-2Gbps not ready
add action=masquerade chain=srcnat comment=
“masquerade Customer to Unifi-1Gbps-3” out-interface=Unifi-2Gbps
TIME-1Gbps not ready
add action=masquerade chain=srcnat comment=
“masquerade Customer to TIME-1Gbps” out-interface=TIME-1Gbps
TIME-1Gbps-2 not ready
add action=masquerade chain=srcnat comment=
“masquerade Customer to TIME-1Gbps-2” out-interface=TIME-1Gbps-2
TIME-1Gbps-3 not ready
add action=masquerade chain=srcnat comment=
“masquerade Customer to TIME-1Gbps-3” out-interface=TIME-1Gbps-3
TIME-1Gbps-4 not ready
add action=masquerade chain=srcnat comment=
“masquerade Customer to TIME-1Gbps-4” out-interface=TIME-1Gbps-4
add action=masquerade chain=srcnat comment=“masquerade internet connection”
disabled=yes out-interface-list=WAN
/ip firewall raw
add action=add-dst-to-address-list address-list=Speedtest
address-list-timeout=none-dynamic chain=prerouting content=speedtest.net
disabled=yes dst-address-list=!GPON_Users src-address-list=GPON_Users
add action=add-dst-to-address-list address-list=Speedtest
address-list-timeout=none-dynamic chain=prerouting content=
speedtest.tm.com.my dst-address-list=!GPON_Users src-address-list=
GPON_Users
add action=add-dst-to-address-list address-list=Speedtest
address-list-timeout=none-dynamic chain=prerouting content=fast.com
disabled=yes dst-address-list=!GPON_Users src-address-list=GPON_Users
/ip ipsec identity
add auth-method=eap-radius certificate=“letsencrypt-autogen_2024-07-08T16:00:3
3Z,r10.pem_0,r11.pem_0,e5-cross.pem_0,e6-cross.pem_0,isrgrootx1.pem_0”
generate-policy=port-strict mode-config=ike2-conf peer=ike2
policy-template-group=ike2-policies
/ip ipsec policy
add dst-address=192.168.99.0/24 group=ike2-policies proposal=ike2
src-address=0.0.0.0/0 template=yes
/ip ipsec settings
set xauth-use-radius=yes
/ip route
add comment=“LB Route Unifi” disabled=no distance=1 dst-address=0.0.0.0/0
gateway=Unifi-1Gbps pref-src=“” routing-table=to_Unifi scope=30
suppress-hw-offload=no target-scope=10
add comment=“LB Route TIME” disabled=no distance=1 dst-address=0.0.0.0/0
gateway=TIME-1Gbps pref-src=“” routing-table=to_TIME scope=30
suppress-hw-offload=no target-scope=10
add comment=“LB Route Unifi-2” disabled=no distance=1 dst-address=0.0.0.0/0
gateway=Unifi-1Gbps-2 pref-src=“” routing-table=to_Unifi-2 scope=30
suppress-hw-offload=no target-scope=10
add comment=“LB Route TIME-2” disabled=no distance=1 dst-address=0.0.0.0/0
gateway=TIME-1Gbps-2 pref-src=“” routing-table=to_TIME-2 scope=30
suppress-hw-offload=no target-scope=10
add comment=“LB Route Unifi-3” disabled=no distance=1 dst-address=0.0.0.0/0
gateway=Unifi-1Gbps-3 pref-src=“” routing-table=to_Unifi-3 scope=30
suppress-hw-offload=no target-scope=10
add disabled=no dst-address=172.16.252.0/22 gateway=192.168.88.2
routing-table=main suppress-hw-offload=no
add disabled=no dst-address=192.168.0.0/24 gateway=192.168.88.2
routing-table=main suppress-hw-offload=no
add disabled=no dst-address=172.16.248.0/22 gateway=192.1.1.2 routing-table=
main suppress-hw-offload=no
add comment=“LB Route TIME-3” disabled=no distance=1 dst-address=0.0.0.0/0
gateway=TIME-1Gbps-3 pref-src=“” routing-table=to_TIME-3 scope=30
suppress-hw-offload=no target-scope=10
add comment=“LB Route TIME-4” disabled=no distance=1 dst-address=0.0.0.0/0
gateway=TIME-1Gbps-4 pref-src=“” routing-table=to_TIME-4 scope=30
suppress-hw-offload=no target-scope=10
add disabled=no distance=1 dst-address=172.16.244.0/22 gateway=192.2.2.2
pref-src=“” routing-table=main scope=30 suppress-hw-offload=no
target-scope=10
add comment=“LB Route Unifi-2Gbps” disabled=no distance=1 dst-address=
0.0.0.0/0 gateway=Unifi-2Gbps pref-src=“” routing-table=to_Unifi-2Gbps
scope=30 suppress-hw-offload=no target-scope=10
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set www-ssl certificate=letsencrypt-autogen_2024-07-08T16:00:33Z disabled=no
set api disabled=yes
set api-ssl disabled=yes
/ip smb shares
set [ find default=yes ] directory=/pub
/ipv6 address
add address=::bab1 from-pool=unifipool6 interface=Management
/ipv6 dhcp-client
add interface=Unifi-1Gbps pool-name=unifipool6 request=prefix
add disabled=yes interface=TIME-1Gbps pool-name=timepool6 request=prefix
add disabled=yes interface=Unifi-1Gbps-2 pool-name=unifipool6-2 request=
prefix
add disabled=yes interface=TIME-1Gbps-2 pool-name=timepool6-2 request=prefix
/ppp aaa
set use-radius=yes
/radius
add address=127.0.0.1 service=login,ipsec
/radius incoming
set accept=yes
/routing ospf interface-template
add area=backbone disabled=no interfaces=Management
add area=backbone disabled=no interfaces=to-Bintang type=ptp
add area=backbone disabled=no interfaces=to-Chambers type=ptp
add area=backbone disabled=no interfaces=to-YouthCity type=ptp
add area=backbone disabled=no interfaces=IKE2
add area=backbone disabled=no interfaces=to-Trion1 type=ptp
add area=backbone disabled=no interfaces=to-Trion2 type=ptp
add area=backbone disabled=no interfaces=CJ1-Internet type=ptp
/routing rule
add action=lookup-only-in-table disabled=yes src-address=172.16.252.0/22
table=Customer
add action=lookup disabled=yes dst-address=192.168.88.0/24 src-address=
192.168.99.0/24 table=to_TIME
add action=lookup disabled=yes dst-address=192.168.88.0/24 src-address=
192.168.99.0/24 table=to_Unifi
/snmp
set contact=Wilson enabled=yes location=Mvertica trap-version=2
/system clock
set time-zone-name=Asia/Kuching
/system clock manual
set time-zone=+08:00
/system identity
set name=Origin_TechLab
/system logging
add disabled=yes topics=pppoe
add topics=wireguard
/system routerboard settings
set enter-setup-on=delete-key
/system scheduler
add interval=12w6d name=certificate_autorenew on-event=“/ip service enable www
;\r
\n/ip firewall filter disable [find comment="drop everything except from
(Hafizul IP)"];\r
\n/log info "Let’s Encrypt certificate renewal started";\r
\n\r
\n/certificate enable-ssl-certificate dns-name=redacted;\r
\n\r
\n/ip service disable www;\r
\n/ip firewall filter disable [find comment="drop everything except from
(Hafizul IP)"];\r
\n/log info "Let’s Encrypt certificate renewal completed";” policy=
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon
start-date=2023-07-15 start-time=00:00:00
add disabled=yes interval=1w name=user-manager_clear_unactive on-event=
“/user-manager/session/remove [find where active=no]” policy=
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon
start-date=2023-07-25 start-time=00:00:00
/tool graphing
set store-every=24hours
/tool graphing interface
add
/user-manager
set certificate=*0 enabled=yes
/user-manager profile-limitation
add limitation=100Mbps profile=GPON_100Mbps
add limitation=200Mbps profile=GPON_200Mbps
add limitation=300Mbps profile=GPON_300Mbps
/user-manager router
add address=127.0.0.1 name=RADIUS
>
Mikrotik 2 (DC)
> ```text
# 2024-07-22 20:17:55 by RouterOS 7.15.2
# software id = redacted
#
# model = CCR2004-1G-12S+2XS
# serial number = redacted
/interface bridge
add name=lan
/interface ethernet
set [ find default-name=sfp-sfpplus2 ] auto-negotiation=no speed=1G-baseX
/interface wireguard
add comment=back-to-home-vpn listen-port=4368 mtu=1420 name=back-to-home-vpn
add listen-port=13234 mtu=1420 name=wg-bintang
add listen-port=13233 mtu=1420 name=wg-chambers
add listen-port=13231 mtu=1420 name=wg-mvertica
add listen-port=13235 mtu=1420 name=wg-trion1
add listen-port=13236 mtu=1420 name=wg-trion2
add listen-port=13232 mtu=1420 name=wg-youthcity
/ip pool
add name=dhcp_pool0 ranges=172.255.0.10-172.255.0.15
/ip dhcp-server
add address-pool=dhcp_pool0 interface=lan name=dhcp1
/port
set 0 name=serial0
set 1 name=serial1
/routing ospf instance
add disabled=no name=ospf-instance-1
/routing ospf area
add disabled=no instance=ospf-instance-1 name=backbone
/interface bridge port
add bridge=lan interface=ether1
add bridge=lan interface=sfp-sfpplus12
/ip firewall connection tracking
set udp-timeout=10s
/interface wireguard peers
add allowed-address=0.0.0.0/0 interface=wg-mvertica is-responder=yes name=\
Mvertica<>CJ1 public-key="zNNiAKHkr4ilR+YlswYQ/2yzVj4R5Sut+0txtNOcqUw="
add allowed-address=0.0.0.0/0 interface=wg-youthcity is-responder=yes name=\
YouthCity<>CJ1 public-key="nP0+2K+p4sJW2eKH0M+Fb4fGVRnJNqccom5tE/U7lkQ="
add allowed-address=0.0.0.0/0 interface=wg-chambers is-responder=yes name=\
Chambers<>CJ1 public-key="RX7krlOq+jvUCmTgk0PKTlPbQkeosmq1ZLGWJc4GTWg="
add allowed-address=0.0.0.0/0 interface=wg-bintang is-responder=yes name=\
Bintang<>CJ1 public-key="nlq2Xpk69LypsJde9Qce1p0rERPakTRanD4/Yo0o/AQ="
add allowed-address=0.0.0.0/0 interface=wg-trion1 is-responder=yes name=\
Trion1<>CJ1 public-key="PNiiHXsE72ujLVxrAviLqgayZGOKFFkEJTlwx3N+M38="
add allowed-address=0.0.0.0/0 interface=wg-trion2 is-responder=yes name=\
Trion2<>CJ1 public-key="ROjuTdblIzPaXo8ko8qxemLNEXAMi0fofe29Ixgze2Q="
/ip address
add address=172.255.0.1/24 comment=defconf interface=lan network=172.255.0.0
add address=redacted interface=sfp-sfpplus1 network=redacted
add address=172.254.0.1/30 interface=wg-mvertica network=172.254.0.0
add address=172.254.0.5/30 interface=wg-youthcity network=172.254.0.4
add address=172.254.0.9/30 interface=wg-chambers network=172.254.0.8
add address=172.254.0.13/30 interface=wg-bintang network=172.254.0.12
add address=172.254.0.17/30 interface=wg-trion1 network=172.254.0.16
add address=172.254.0.21/30 interface=wg-trion2 network=172.254.0.20
/ip cloud
set back-to-home-vpn=enabled ddns-enabled=yes
/ip cloud back-to-home-users
add allow-lan=yes name=fizo private-key=\
redacted public-key=\
"Ssnvcx/np5AeZhwBlygsr6epgpymgyzQKiy38iDM5wc="
add allow-lan=yes name=wilson private-key=\
redacted public-key=\
"VhGrSrbNflE9q+M57saeGcjpYL8G+9nMEgxJUODlMRs="
/ip dhcp-server network
add address=172.255.0.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=172.255.0.1
/ip dns
set servers=8.8.8.8,8.8.4.4
/ip firewall address-list
add address=redacted list=CJ1
/ip firewall nat
add action=masquerade chain=srcnat out-interface=sfp-sfpplus1
add action=dst-nat chain=dstnat comment="SSH tcp/22 dst-nat to Splynx Server" \
dst-port=22 in-interface=sfp-sfpplus1 protocol=tcp to-addresses=\
172.255.0.254 to-ports=22
add action=dst-nat chain=dstnat comment=\
"HTTP tcp/80 dst-nat to Splynx Server" dst-port=80 in-interface=\
sfp-sfpplus1 protocol=tcp to-addresses=172.255.0.254 to-ports=80
add action=dst-nat chain=dstnat comment=\
"HTTP tcp/443 dst-nat to Splynx Server" dst-port=443 in-interface=\
sfp-sfpplus1 protocol=tcp to-addresses=172.255.0.254 to-ports=443
/ip route
add disabled=no dst-address=0.0.0.0/0 gateway=redacted routing-table=\
main suppress-hw-offload=no
add disabled=no dst-address=172.16.252.0/22 gateway=172.254.0.2 \
routing-table=main suppress-hw-offload=no
add disabled=no distance=1 dst-address=172.16.248.0/22 gateway=172.254.0.6 \
routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=1 dst-address=172.16.244.0/22 gateway=172.254.0.10 \
routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=1 dst-address=172.16.240.0/22 gateway=172.254.0.14 \
routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=1 dst-address=172.16.236.0/22 gateway=172.254.0.18 \
routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=1 dst-address=172.16.232.0/22 gateway=172.254.0.22 \
routing-table=main scope=30 suppress-hw-offload=no target-scope=10
/ipv6 route
add disabled=no dst-address=::/0 gateway=redacted routing-table=\
main
/ip service
set telnet disabled=yes
set ftp disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/ipv6 address
add address=redacted interface=sfp-sfpplus1
/routing ospf interface-template
add area=backbone disabled=no interfaces=wg-mvertica type=ptp
add area=backbone disabled=no interfaces=wg-youthcity type=ptp
add area=backbone disabled=no interfaces=wg-chambers type=ptp
add area=backbone disabled=no interfaces=wg-bintang type=ptp
add area=backbone disabled=no interfaces=wg-trion1 type=ptp
add area=backbone disabled=no interfaces=wg-trion2 type=ptp
add area=backbone disabled=no interfaces=lan
/system clock
set time-zone-name=Asia/Kuala_Lumpur
/system identity
set name=OriginTechLab-CJ1
/system note
set show-at-login=no
/system routerboard settings
set enter-setup-on=delete-key
I want to route all of the users and all of the traffic to the specific WAN link. Basically I want to do PCC load balance but through the wireguard tunnel. I want to create a tunnel for each WAN links and redirect all traffic thru the tunnels
Also answer,
identify all users of wireguard tunnel
identify what traffic they need ( your input is not specific enough )