LoadBalancing Using Mikrotik

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.พ. 2025
  • LoadBalancing Using Mikrotik RB1100AHX2
    #Mikrotik
    #PCC #LoadBalancing

ความคิดเห็น • 10

  • @fouadalhorani1407
    @fouadalhorani1407 5 ปีที่แล้ว

    السلام عليكم لو سمحت اخي ممكن رول الدمج لو سمحت

    • @blackalert.agency
      @blackalert.agency  5 ปีที่แล้ว +1

      اكيد اخي

    • @fouadalhorani1407
      @fouadalhorani1407 5 ปีที่แล้ว

      @@blackalert.agency فيك تبعثو ع الايميل ؟

    • @blackalert.agency
      @blackalert.agency  5 ปีที่แล้ว +1

      نشرتلك الرول عدل الاي بي مع المنافذ لكرت الشبكة
      بالتوفيق

  • @blackalert.agency
    @blackalert.agency  5 ปีที่แล้ว +1

    /interface ethernet
    set [ find default-name=ether10 ] name=LOCAL speed=100Mbps
    set [ find default-name=ether1 ] loop-protect=off name=WAN1 speed=100Mbps
    set [ find default-name=ether2 ] loop-protect=off name=WAN2 speed=100Mbps
    set [ find default-name=ether3 ] name=WAN3 speed=100Mbps
    set [ find default-name=ether4 ] disabled=yes loop-protect=off name=WAN4 \
    speed=100Mbps
    set [ find default-name=ether5 ] name=WAN5 speed=100Mbps
    set [ find default-name=ether6 ] name=WAN6 speed=100Mbps
    set [ find default-name=ether7 ] name=WAN7 speed=100Mbps
    set [ find default-name=ether8 ] speed=100Mbps
    set [ find default-name=ether9 ] speed=100Mbps
    set [ find default-name=ether11 ] advertise=\
    10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
    set [ find default-name=ether12 ] advertise=\
    10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
    set [ find default-name=ether13 ] advertise=\
    10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
    /ip pool
    add name=dhcp_pool0 ranges=192.168.200.21-192.168.200.254
    /ip dhcp-server
    add address-pool=dhcp_pool0 disabled=no interface=LOCAL lease-time=3h10m \
    name=dhcp1
    /tool user-manager customer
    set admin access=\
    own-routers,own-users,own-profiles,own-limits,config-payment-gw
    /interface detect-internet
    set detect-interface-list=all
    /ip address
    add address=192.168.200.1/24 interface=LOCAL network=192.168.200.0
    add address=192.168.40.108/24 interface=WAN1 network=192.168.40.0
    add address=192.168.41.110/24 interface=WAN3 network=192.168.41.0
    add address=192.168.42.146/24 interface=WAN4 network=192.168.42.0
    add address=192.168.44.112/24 interface=WAN5 network=192.168.44.0
    add address=192.168.43.109/24 interface=WAN2 network=192.168.43.0
    add address=192.168.46.156/24 interface=WAN6 network=192.168.46.0
    /ip cloud
    set update-time=no
    /ip dhcp-client
    add dhcp-options=hostname,clientid interface=WAN3 use-peer-ntp=no
    /ip dhcp-server network
    add address=192.168.200.0/24 gateway=192.168.200.1
    /ip dns
    set allow-remote-requests=yes cache-size=5000KiB servers=\
    37.152.3.67,37.152.5.20
    /ip firewall mangle
    add action=mark-connection chain=input comment="WAN1 Conn Mark" in-interface=\
    WAN1 new-connection-mark=WAN1_conn passthrough=yes
    add action=mark-connection chain=input comment="WAN2 Conn Mark" in-interface=\
    WAN2 new-connection-mark=WAN2_conn passthrough=yes
    add action=mark-connection chain=input comment="WAN3 Conn Mark" in-interface=\
    WAN3 new-connection-mark=WAN3_conn passthrough=yes
    add action=mark-connection chain=input comment="WAN4 Conn Mark" in-interface=\
    WAN4 new-connection-mark=WAN4_conn passthrough=yes
    add action=mark-connection chain=input comment="WAN5 Conn Mark" in-interface=\
    WAN5 new-connection-mark=WAN5_conn passthrough=yes
    add action=mark-connection chain=input comment="WAN6 Conn Mark" in-interface=\
    WAN6 new-connection-mark=WAN6_conn passthrough=yes
    add action=mark-routing chain=output comment="Routing to WAN1" \
    connection-mark=WAN1_conn new-routing-mark=to_WAN1 passthrough=yes
    add action=mark-routing chain=output comment="Routing to WAN2" \
    connection-mark=WAN2_conn new-routing-mark=to_WAN2 passthrough=yes
    add action=mark-routing chain=output comment="Routing to WAN3" \
    connection-mark=WAN3_conn new-routing-mark=to_WAN3 passthrough=yes
    add action=mark-routing chain=output comment="Routing to WAN4" \
    connection-mark=WAN4_conn new-routing-mark=to_WAN4 passthrough=yes
    add action=mark-routing chain=output comment="Routing to WAN5" \
    connection-mark=WAN5_conn new-routing-mark=to_WAN5 passthrough=yes
    add action=mark-routing chain=output comment="Routing to WAN6" \
    connection-mark=WAN6_conn new-routing-mark=to_WAN6 passthrough=yes
    add action=accept chain=prerouting comment="WAN1 Sticky Conn" dst-address=\
    192.168.40.0/24 in-interface=LOCAL
    add action=accept chain=prerouting comment="WAN2 Sticky Conn" dst-address=\
    192.168.43.0/24 in-interface=LOCAL
    add action=accept chain=prerouting comment="WAN3 Sticky Conn" dst-address=\
    192.168.41.0/24 in-interface=LOCAL
    add action=accept chain=prerouting comment="WAN4 Sticky Conn" dst-address=\
    192.168.42.0/24 in-interface=LOCAL
    add action=accept chain=prerouting comment="WAN5 Sticky Conn" dst-address=\
    192.168.44.0/24 in-interface=LOCAL
    add action=accept chain=prerouting comment="WAN6 Sticky Conn" dst-address=\
    192.168.46.0/24 in-interface=LOCAL
    add action=mark-connection chain=prerouting comment="BALANCING WAN5" \
    dst-address-type=!local new-connection-mark=WAN5_conn passthrough=yes \
    per-connection-classifier=both-addresses-and-ports:6/4
    add action=mark-connection chain=prerouting comment="BALANCING WAN1" \
    dst-address-type=!local new-connection-mark=WAN1_conn passthrough=yes \
    per-connection-classifier=both-addresses-and-ports:6/0
    add action=mark-connection chain=prerouting comment="BALANCING WAN2" \
    dst-address-type=!local new-connection-mark=WAN2_conn passthrough=yes \
    per-connection-classifier=both-addresses-and-ports:6/1
    add action=mark-connection chain=prerouting comment="BALANCING WAN3" \
    dst-address-type=!local new-connection-mark=WAN3_conn passthrough=yes \
    per-connection-classifier=both-addresses-and-ports:6/2
    add action=mark-connection chain=prerouting comment="BALANCING WAN4" \
    dst-address-type=!local new-connection-mark=WAN4_conn passthrough=yes \
    per-connection-classifier=both-addresses-and-ports:6/3
    add action=mark-connection chain=prerouting comment="BALANCING WAN6" \
    dst-address-type=!local new-connection-mark=WAN6_conn passthrough=yes \
    per-connection-classifier=both-addresses-and-ports:6/5
    add action=mark-routing chain=prerouting comment=\
    "MARKING Conn With Routing WAN1" connection-mark=WAN1_conn in-interface=\
    LOCAL new-routing-mark=to_WAN1 passthrough=yes
    add action=mark-routing chain=prerouting comment=\
    "MARKING Conn With Routing WAN2" connection-mark=WAN2_conn in-interface=\
    LOCAL new-routing-mark=to_WAN2 passthrough=yes
    add action=mark-routing chain=prerouting comment=\
    "MARKING Conn With Routing WAN3" connection-mark=WAN3_conn in-interface=\
    LOCAL new-routing-mark=to_WAN3 passthrough=yes
    add action=mark-routing chain=prerouting comment=\
    "MARKING Conn With Routing WAN4" connection-mark=WAN4_conn in-interface=\
    LOCAL new-routing-mark=to_WAN4 passthrough=yes
    add action=mark-routing chain=prerouting comment=\
    "MARKING Conn With Routing WAN5" connection-mark=WAN5_conn in-interface=\
    LOCAL new-routing-mark=to_WAN5 passthrough=yes
    add action=mark-routing chain=prerouting comment=\
    "MARKING Conn With Routing WAN6" connection-mark=WAN6_conn in-interface=\
    LOCAL new-routing-mark=to_WAN6 passthrough=yes
    /ip firewall nat
    add action=dst-nat chain=dstnat comment=ssh dst-port=22 in-interface=WAN1 \
    protocol=tcp to-addresses=192.168.200.252 to-ports=22
    add action=dst-nat chain=dstnat comment=winbox dst-port=8293 in-interface=\
    WAN1 protocol=tcp to-addresses=192.168.200.252 to-ports=8293
    add action=dst-nat chain=dstnat comment=MYSQL dst-port=3306 in-interface=WAN1 \
    protocol=tcp to-addresses=192.168.200.252 to-ports=3306
    add action=dst-nat chain=dstnat comment=Website dst-port=81 in-interface=WAN1 \
    protocol=tcp to-addresses=192.168.200.252 to-ports=80
    add action=dst-nat chain=dstnat comment=WEBMIN dst-port=8295 in-interface=\
    WAN1 protocol=tcp to-addresses=192.168.200.252 to-ports=8295
    add action=dst-nat chain=dstnat comment=WEBMIN disabled=yes dst-port=8295 \
    in-interface=WAN1 protocol=udp to-addresses=192.168.200.252 to-ports=8295
    add action=masquerade chain=srcnat out-interface=WAN1
    add action=masquerade chain=srcnat out-interface=WAN2
    add action=masquerade chain=srcnat out-interface=WAN3
    add action=masquerade chain=srcnat out-interface=WAN4
    add action=masquerade chain=srcnat out-interface=WAN5
    add action=masquerade chain=srcnat out-interface=WAN6
    /ip route
    add check-gateway=ping distance=1 gateway=192.168.40.1 routing-mark=to_WAN1
    add check-gateway=ping distance=1 gateway=192.168.43.1 routing-mark=to_WAN2
    add check-gateway=ping distance=1 gateway=192.168.41.1 routing-mark=to_WAN3
    add check-gateway=ping disabled=yes distance=1 gateway=192.168.42.1 \
    routing-mark=to_WAN4
    add check-gateway=ping distance=1 gateway=192.168.44.1 routing-mark=to_WAN5
    add check-gateway=ping distance=1 gateway=192.168.46.1 routing-mark=to_WAN6
    add check-gateway=ping distance=1 gateway=192.168.40.1
    add check-gateway=ping distance=2 gateway=192.168.43.1
    add check-gateway=ping distance=3 gateway=192.168.41.1
    add check-gateway=ping distance=5 gateway=192.168.44.1
    add check-gateway=ping distance=6 gateway=192.168.46.1
    add check-gateway=ping disabled=yes distance=4 gateway=192.168.42.1
    /ip service
    set telnet disabled=yes
    set ftp disabled=yes
    set ssh disabled=yes
    set api-ssl disabled=yes
    /ip ssh
    set allow-none-crypto=yes
    /system identity
    set name=HINET-Balancer
    /tool user-manager database
    set db-path=user-manager

  • @fouadalhorani1407
    @fouadalhorani1407 5 ปีที่แล้ว

    تبعثلي اياه ع الايميل اخي اذا بي مجال

    • @blackalert.agency
      @blackalert.agency  5 ปีที่แล้ว +1

      رح انشره ببلك

    • @fouadalhorani1407
      @fouadalhorani1407 5 ปีที่แล้ว

      @@blackalert.agency الله يجزاك الف خير والشكر الك اخي

    • @fouadalhorani1407
      @fouadalhorani1407 5 ปีที่แล้ว

      @@blackalert.agency اسف ع ازعاجك بس اذا امكن وين نشرت الرول الدمج

    • @fouadalhorani1407
      @fouadalhorani1407 5 ปีที่แล้ว

      @@blackalert.agency السلام عليكم يعطيك الف عافية اخي فراس عدلت متل ما قلت ولكن ما زبط الدمج ممكن تدخل اني ديسك لو سمحت وتشوف وين الغلط صار لو سمحت