القائمة الرئيسية

الصفحات

سكربت دمج 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
    
أنت الان في اول موضوع

تعليقات

تعليق واحد
إرسال تعليق
  1. في الخطوه الثالثه كيف اتاكد اني استخدم ip محلي ؟. ايش تقصد. او منين اجيب الايبي المحلي

    ردحذف

إرسال تعليق

التنقل السريع