التخطي إلى المحتوى الرئيسي

سكربت دمج 3 خطوط بردج مع حماية للخطوط mikrotik firewall pppoe + load balance 3 isp bridge pcc


سكربت دمج عدد3 خطوط بردج بسرعات متساوية او غير متساوية في روتر المايكروتك  

متطلبات قبل تنفيذ الاسكربت :

  1-  تغيير اي بي اللست LAN الى اي بي منفذ خروج الشبكة.    

  2- عمل نسخة احتياطية للروتر قبل نسخ الاسكربت.

 3- التأكد من استخدامك ip محلي الذي يشمل ال LIST -not_in_internet

 

اولا: سكربت اضافة الخطوط يرجى تعديل إسم منافذ الخطوط حيث ان الافتراضي في الاسكربت IN و ايضا تعديل اسم المستخدم و كلمة المرور الخاص بمزود الخدمة بلا من 000000-123456


  
/interface pppoe-client
add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 \
    dial-on-demand=no disabled=no interface=IN1 max-mru=1500 max-mtu=1492 \
    mrru=disabled name=pppoe-out1 password=123456 profile=default \
    service-name="" use-peer-dns=no user=1595517fams
add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 \
    dial-on-demand=no disabled=no interface=IN2 max-mru=1500 max-mtu=1492 \
    mrru=disabled name=pppoe-out2 password=123456 profile=default \
    service-name="" use-peer-dns=no user=1595519fams
add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 \
    dial-on-demand=no disabled=no interface=IN3 max-mru=1500 max-mtu=1492 \
    mrru=disabled name=pppoe-out3 password=123456 profile=default \
    service-name="" use-peer-dns=no user=000000

    

ثانيا: سكربت دمج الخطوط

 


  
 /ip firewall address-list
add list=LAN address=192.168.0.0/24
add address=172.16.0.0/12 comment=RFC6890 list=not_in_internet
add address=192.168.0.0/16 comment=RFC6890 list=not_in_internet
add address=10.0.0.0/8 comment=RFC6890 list=not_in_internet
add address=169.254.0.0/16 comment=RFC6890 list=not_in_internet
add address=127.0.0.0/8 comment=RFC6890 list=not_in_internet
add address=224.0.0.0/4 comment=Multicast list=not_in_internet
add address=198.18.0.0/15 comment=RFC6890 list=not_in_internet
add address=192.0.0.0/24 comment=RFC6890 list=not_in_internet
add address=192.0.2.0/24 comment=RFC6890 list=not_in_internet
add address=198.51.100.0/24 comment=RFC6890 list=not_in_internet
add address=203.0.113.0/24 comment=RFC6890 list=not_in_internet
add address=100.64.0.0/10 comment=RFC6890 list=not_in_internet
add address=240.0.0.0/4 comment=RFC6890 list=not_in_internet
add address=192.88.99.0/24 comment="6to4 relay Anycast [RFC 3068]" list=not_in_internet

/ip firewall mangle
add action=mark-connection chain=prerouting  src-address-list=LAN dst-address-list=!not_in_internet new-connection-mark=ISP1_conn passthrough=yes per-connection-classifier=src-address-and-port:3/0
add action=mark-connection chain=prerouting  src-address-list=LAN dst-address-list=!not_in_internet new-connection-mark=ISP2_conn passthrough=yes per-connection-classifier=src-address-and-port:3/1
add action=mark-connection chain=prerouting  src-address-list=LAN dst-address-list=!not_in_internet new-connection-mark=ISP3_conn passthrough=yes per-connection-classifier=src-address-and-port:3/2

add action=mark-routing chain=prerouting connection-mark=ISP1_conn \
    src-address-list=LAN dst-address-list=!not_in_internet new-routing-mark=r1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=ISP2_conn \
    src-address-list=LAN dst-address-list=!not_in_internet new-routing-mark=r2 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=ISP3_conn \
    src-address-list=LAN dst-address-list=!not_in_internet new-routing-mark=r3 passthrough=yes

/ip route

add distance=1 gateway=pppoe-out2,pppoe-out3

add distance=1 gateway=pppoe-out1 routing-mark=r1

add distance=1 gateway=pppoe-out2 routing-mark=r2

add distance=1 gateway=pppoe-out3 routing-mark=r3


 
  

ثالثا :سكربت الحماية

 


 /interface list

add name=PPPOE


{

:foreach i in=[/interface pppoe-client find ] do={

:local a [/interface pppoe-client get $i name];

/interface list member add list=PPPOE interface=$a comment=salmandahmash;

}

}


/ip firewall raw

add action=drop chain=prerouting dst-port=53 in-interface-list=PPPOE protocol=tcp

add action=drop chain=prerouting dst-port=53 in-interface-list=PPPOE protocol=udp
    

تعليقات

شائع

صفحة تحديد سرعة 2025 لكروت الهوتسبوت واليوزر منجر اسم مستخدم وكلمة مرور فارغة مع حفظ التقسيم داخل الصفحة

* بسم الله الرحمن الرحيم * صفحة حصرية 2025 مع حفظ تحديد السرعة داخل الصفحة وايضا حفظ الكرت  اهم مميزات الصفحة: حفظ الكرت في الصفحة  حفظ تقسيم السرعة الذي يختاره المستخدم داخل الصفحة حتى ينتهي الكرت حتى ان انتقل من جهاز الى جهاز آخر . التقسيم صالح لجميع الشبكات هوتسبوت ويوزر منجر ومهما كانت طريقة البرمجة. سواء لكل فيلان هوتسبوت او سرفر واحد .. هااااااام جدا  لكي تعمل الصفحة بشكل صحيح ويتم حفظ الكرت والتقسيم داخل الصفحة حتى لو انتقلت من جهاز الى جهاز يجب الغاء الماك كوكي من الروتر يكفي حفظ الكرت في الصفحة   شرح تركيب الصفحة  اولا: نسخ سكربت raw لاضافة السرعات الى الادرس لست  الاسكربت :  /ip firewall raw add action=add-src-to-address-list address-list=20M address-list-timeout=none-dynamic chain=prerouting content=204123ab-55-sa dst-port=80 protocol=tcp src-address-list=!20M add action=add-src-to-address-list address-list=5M address-list-timeout=none-dynamic chain=prerouting content=204ccc8c8c44-azd dst-port=80 protocol=tcp src-address-list=!5M add action...

إغلاق البورت 80 وحماية الشبكة من مشكلة استنزاف الرصيد Mikrotik

 حماية جديدة وحصرية للبورت 80 نقدمها لشبكات المايكروتك ومن يعاني من مشكلة استنزاف الرصيد  يجب تركيب الحماية بالشكل الصحيح. طريقة التركيب الصحيح : 1- تغيير ip  في الاسكربت من 172.20.25.1 الى ip الصفحة. 2- لمعرفة ip الصفحة من القائمة ip-dns-static . 3- تغيير ip في الاسكربت من 172.16.0.0/12 الى رنج شبكك . 4- تاكد بعد نسخ الاسكربت من ان الحماية موجودة في رأس الfilter بتعليق salmandahmash سكربت الحماية : /ip firewall mangle add action=accept chain=prerouting content=samsun dst-port=80 hotspot=from-client,!auth protocol=tcp add action=accept chain=prerouting content=apple dst-port=80 hotspot=from-client,!auth protocol=tcp add action=accept chain=prerouting content=204 dst-port=80 hotspot=from-client,!auth protocol=tcp add action=accept chain=prerouting content=htm dst-port=80 hotspot=from-client,!auth protocol=tcp add action=accept chain=prerouting content=rom dst-port=80 hotspot=from-client,!auth protocol=tcp add action=accept chain=prerouting content=txt dst-port=80 h...

حل مشكلة توقف الroutes (متصل ولا يتوفر انترنت) عند اقلاع المايكروتك وغالبا تكون المشكلة عند البرمجة بطريقة لكل فيلان سرفر Mikrotik مايكروتك

سكربت لحل مشكلة توقف الroutes  عند اقلاع المايكروتك وغالبا تكون المشكلة عند من يستخدم لكل فيلان سرفر لمن يعاني من توقف بعض اجهزة الفيلان بعد اقلاع المايكروتك (متصل ولا يتوفر انترنت) قبل تنفيذ الاسكربت يرجى عمل comment لip واحد فقط  من القائمة ip address ثم تقوم بعمل comment على فيلان او منفذ الخروج بالرقم 1 فقط . يتم وضع الاسكربت في   system  scheduler وتشغيلة عند  startup الاسكربت : delay delay-time=05s; /ip address disable [find dynamic=no && comment!=1]; delay delay-time=20s; /ip address enable [find disabled=yes ]; نسخ