My Server specifications
mikrotik 5.4 registered level 6
5 interface
local
wan1
wan2
wan3
wan4
My script
/ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=local
add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=WAN1
add address=192.168.2.2/24 network=192.168.2.0 broadcast=192.168.2.255 interface=WAN2
add address=192.168.3.2/24 network=192.168.3.0 broadcast=192.168.3.255 interface=WAN3
add address=192.168.4.2/24 network=192.168.4.0 broadcast=192.168.4.255 interface=WAN4
/ip firewall mangle
add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=local
add chain=prerouting dst-address=192.168.2.0/24 action=accept in-interface=local
add chain=prerouting dst-address=192.168.3.0/24 action=accept in-interface=local
add chain=prerouting dst-address=192.168.4.0/24 action=accept in-interface=local
add chain=input in-interface=WAN1 action=mark-connection new-connection-mark=WAN1_conn
add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=WAN2_conn
add chain=input in-interface=WAN3 action=mark-connection new-connection-mark=WAN3_conn
add chain=input in-interface=WAN4 action=mark-connection new-connection-mark=WAN4_conn
add chain=prerouting dst-address-type=!local in-interface=local per-connection-classifier=both-addresses-and-ports:4/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=local per-connection-classifier=both-addresses-and-ports:4/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=local per-connection-classifier=both-addresses-and-ports:4/2 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=local per-connection-classifier=both-addresses-and-ports:4/3 action=mark-connection new-connection-mark=WAN4_conn passthrough=yes
add chain=prerouting connection-mark=WAN1_conn in-interface=local action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=local action=mark-routing new-routing-mark=to_WAN2
add chain=prerouting connection-mark=WAN3_conn in-interface=local action=mark-routing new-routing-mark=to_WAN3
add chain=prerouting connection-mark=WAN4_conn in-interface=local action=mark-routing new-routing-mark=to_WAN4
add chain=output connection-mark=WAN1_conn action=mark-routing new-routing-mark=to_WAN1
add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=to_WAN2
add chain=output connection-mark=WAN3_conn action=mark-routing new-routing-mark=to_WAN3
add chain=output connection-mark=WAN4_conn action=mark-routing new-routing-mark=to_WAN4
/ip firewall nat
add action=accept chain=pre-hotspot disabled=no dst-address-type=!local hotspot=auth
add chain=srcnat out-interface=WAN1 action=masquerade
add chain=srcnat out-interface=WAN2 action=masquerade
add chain=srcnat out-interface=WAN3 action=masquerade
add chain=srcnat out-interface=WAN4 action=masquerade
/ip route
add dst-address=8.8.4.4 gateway=192.168.1.1 scope=10
add dst-address=173.194.38.135 gateway=192.168.1.1 scope=10
add dst-address=116.71.241.198 gateway=192.168.2.1 scope=10
add dst-address=173.252.110.27 gateway=192.168.2.1 scope=10
add dst-address=8.8.8.8 gateway=192.168.3.1 scope=10
add dst-address=199.59.148.82 gateway=192.168.3.1 scope=10
add dst-address=156.154.70.1 gateway=192.168.4.1 scope=10
add dst-address=156.154.71.1 gateway=192.168.4.1 scope=10
add dst-address=10.1.1.1 gateway=8.8.4.4 scope=10 target-scope=10 check-gateway=ping
add dst-address=10.1.1.1 gateway=173.194.38.135 scope=10 target-scope=10 check-gateway=ping
add dst-address=10.2.2.2 gateway=116.71.241.198 scope=10 target-scope=10 check-gateway=ping
add dst-address=10.2.2.2 gateway=173.252.110.27 scope=10 target-scope=10 check-gateway=ping
add dst-address=10.3.3.3 gateway=8.8.8.8 scope=10 target-scope=10 check-gateway=ping
add dst-address=10.3.3.3 gateway=199.59.148.82 scope=10 target-scope=10 check-gateway=ping
add dst-address=10.4.4.4 gateway=156.154.70.1 scope=10 target-scope=10 check-gateway=ping
add dst-address=10.4.4.4 gateway=156.154.71.1 scope=10 target-scope=10 check-gateway=ping
add distance=1 gateway=10.1.1.1 routing-mark=to_WAN1
add distance=2 gateway=10.2.2.2 routing-mark=to_WAN1
add distance=3 gateway=10.3.3.3 routing-mark=to_WAN1
add distance=4 gateway=10.4.4.4 routing-mark=to_WAN1
add distance=1 gateway=10.2.2.2 routing-mark=to_WAN2
add distance=2 gateway=10.3.3.3 routing-mark=to_WAN2
add distance=3 gateway=10.4.4.4 routing-mark=to_WAN2
add distance=4 gateway=10.1.1.1 routing-mark=to_WAN2
add distance=1 gateway=10.3.3.3 routing-mark=to_WAN3
add distance=2 gateway=10.4.4.4 routing-mark=to_WAN3
add distance=3 gateway=10.1.1.1 routing-mark=to_WAN3
add distance=4 gateway=10.2.2.2 routing-mark=to_WAN3
add distance=1 gateway=10.4.4.4 routing-mark=to_WAN4
add distance=2 gateway=10.1.1.1 routing-mark=to_WAN4
add distance=3 gateway=10.2.2.2 routing-mark=to_WAN4
add distance=4 gateway=10.3.3.3 routing-mark=to_WAN4
/ip pool add name=pppoe-users-pool ranges=10.0.0.1-10.0.0.255
/ppp profile add change-tcp-mss=default dns-server=192.168.0.1 local-address=192.168.0.1 name=pppoe-profile only-one=yes remote-address=pppoe-users-pool use-compression=default use-encryption=default use-vj-compression=default
/interface pppoe-server server add authentication=pap default-profile=pppoe-profile disabled=no interface=local keepalive-timeout=10 max-mru=1480 max-mtu=1480 max-sessions=1 mrru=disabled one-session-per-host=yes service-name="JJnet"
/ppp secret add caller-id="" disabled=no limit-bytes-in=0 limit-bytes-out=0 name=nabeel password=123456 profile=pppoe-profile routes="" service=pppoe
/ppp aaa set accounting=yes interim-update=0s use-radius=yes
/radius add accounting-backup=no accounting-port=1813 address=127.0.0.1 authentication-port=1812 called-id="" disabled=no domain="" realm="" secret=14122115 service=ppp,hotspot timeout=300ms
/radius incoming set accept=yes port=3799