دمج برودباند +هوت سبوت بريدج NTH لعمل اكتر من كونكشن

دمج برودباند +هوت سبوت بريدج NTH  لعمل اكتر من كونكشن
المؤلف compu5star
تاريخ النشر
آخر تحديث
  1. دمج برودباند +هوت سبوت بريدج NTH  لعمل اكتر من كونكشن 





الاسكربت



دمج برودباند +هوت سبوت بريدج NTH

الخروج :Local

WAN1 راوتر1

WAN2  راوتر2

 ايبي الخروج للهوت سبوت  10.0.0.1
ايبي الخروج للبرودباند  10.10.10.1
 
 


/interface pppoe-client
add ac-name="" add-default-route=yes allow=pap,chap,mschap1,mschap2 \
    dial-on-demand=no disabled=yes interface="(unknown)" max-mru=1480 \
    max-mtu=1480 mrru=disabled name=pppoe-out1 password=41980728 profile=\
    default service-name="" use-peer-dns=no user=0000000@tedata.net.eg
add ac-name="" add-default-route=yes allow=pap,chap,mschap1,mschap2 \
    dial-on-demand=no disabled=yes interface="(unknown)" max-mru=1480 \
    max-mtu=1480 mrru=disabled name=pppoe-out2 password=41980728 profile=\
    default service-name="" use-peer-dns=no user=0000000@tedata.net.eg
add ac-name="" add-default-route=yes allow=pap,chap,mschap1,mschap2 \
    dial-on-demand=no disabled=yes interface="(unknown)" max-mru=1480 \
    max-mtu=1480 mrru=disabled name=pppoe-out3 password=41980728 profile=\
    default service-name="" use-peer-dns=no user=0000000@tedata.net.eg
add ac-name="" add-default-route=yes allow=pap,chap,mschap1,mschap2 \
    dial-on-demand=no disabled=yes interface="(unknown)" max-mru=1480 \
    max-mtu=1480 mrru=disabled name=pppoe-out4 password=41980728 profile=\
    default service-name="" use-peer-dns=no user=0000000@tedata.net.eg

/ip firewall mangle
add action=mark-connection chain=input disabled=no in-interface=pppoe-out1 \
    new-connection-mark=conn1 passthrough=yes
add action=mark-connection chain=input disabled=no in-interface=pppoe-out4 \
    new-connection-mark=conn4 passthrough=yes
add action=mark-connection chain=input disabled=no in-interface=pppoe-out2 \
    new-connection-mark=conn2 passthrough=yes
add action=mark-connection chain=input disabled=no in-interface=pppoe-out3 \
    new-connection-mark=conn3 passthrough=yes
add action=mark-connection chain=input disabled=no in-interface=pppoe-out5 \
    new-connection-mark=conn5 passthrough=yes
add action=mark-connection chain=input disabled=no in-interface=pppoe-out6 \
    new-connection-mark=conn6 passthrough=yes
add action=mark-connection chain=input disabled=no in-interface=pppoe-out7 \
    new-connection-mark=conn7 passthrough=yes
add action=mark-connection chain=input disabled=no in-interface=pppoe-out8 \
    new-connection-mark=conn8 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=conn1 disabled=no \
    in-interface=pppoe-out1 new-routing-mark=conn1 passthrough=no
add action=mark-routing chain=prerouting connection-mark=conn2 disabled=no \
    in-interface=pppoe-out2 new-routing-mark=conn2 passthrough=no
add action=mark-routing chain=prerouting connection-mark=conn3 disabled=no \
    in-interface=pppoe-out3 new-routing-mark=conn3 passthrough=no
add action=mark-routing chain=prerouting connection-mark=conn4 disabled=no \
    in-interface=pppoe-out4 new-routing-mark=conn4 passthrough=no
add action=mark-routing chain=prerouting connection-mark=conn5 disabled=no \
    in-interface=pppoe-out5 new-routing-mark=conn5 passthrough=no
add action=mark-routing chain=prerouting connection-mark=conn6 disabled=no \
    in-interface=pppoe-out6 new-routing-mark=conn6 passthrough=no
add action=mark-routing chain=prerouting connection-mark=conn7 disabled=no \
    in-interface=pppoe-out7 new-routing-mark=conn7 passthrough=no
add action=mark-routing chain=prerouting connection-mark=conn8 disabled=no \
    in-interface=pppoe-out8 new-routing-mark=conn8 passthrough=no
add action=accept chain=prerouting disabled=no in-interface=pppoe-out1
add action=accept chain=prerouting disabled=no in-interface=pppoe-out2
add action=accept chain=prerouting disabled=no in-interface=pppoe-out3
add action=accept chain=prerouting disabled=no in-interface=pppoe-out4
add action=accept chain=prerouting disabled=no in-interface=pppoe-out5
add action=accept chain=prerouting disabled=no in-interface=pppoe-out6
add action=accept chain=prerouting disabled=no in-interface=pppoe-out7
add action=accept chain=prerouting disabled=no in-interface=pppoe-out8
add action=mark-connection chain=prerouting connection-state=new disabled=no \
    dst-address-type=!local in-interface=pppoe-out1 new-connection-mark=conn1 \
    passthrough=yes per-connection-classifier=both-addresses-and-ports:8/0 \
    src-address=10.10.10.1-10.10.10.254
add action=mark-connection chain=prerouting connection-state=new disabled=no \
    dst-address-type=!local in-interface=pppoe-out2 new-connection-mark=conn2 \
    passthrough=yes per-connection-classifier=both-addresses-and-ports:8/1 \
    src-address=10.10.10.1-10.10.10.254
add action=mark-connection chain=prerouting connection-state=new disabled=no \
    dst-address-type=!local in-interface=pppoe-out4 new-connection-mark=conn4 \
    passthrough=yes per-connection-classifier=both-addresses-and-ports:8/2 \
    src-address=10.10.10.1-10.10.10.254
add action=mark-connection chain=prerouting connection-state=new disabled=no \
    dst-address-type=!local in-interface=pppoe-out3 new-connection-mark=conn3 \
    passthrough=yes per-connection-classifier=both-addresses-and-ports:8/3 \
    src-address=10.10.10.1-10.10.10.254
add action=mark-connection chain=prerouting connection-state=new disabled=no \
    dst-address-type=!local in-interface=pppoe-out5 new-connection-mark=conn5 \
    passthrough=yes per-connection-classifier=both-addresses-and-ports:8/4 \
    src-address=10.10.10.1-10.10.10.254
add action=mark-connection chain=prerouting connection-state=new disabled=no \
    dst-address-type=!local in-interface=pppoe-out6 new-connection-mark=conn6 \
    passthrough=yes src-address=10.10.10.1-10.10.10.254
add action=mark-connection chain=prerouting connection-state=new disabled=no \
    dst-address-type=!local in-interface=pppoe-out7 new-connection-mark=conn7 \
    passthrough=yes per-connection-classifier=both-addresses-and-ports:8/6 \
    src-address=10.10.10.1-10.10.10.254
add action=mark-connection chain=prerouting connection-state=new disabled=no \
    dst-address-type=!local in-interface=pppoe-out8 new-connection-mark=conn8 \
    passthrough=yes per-connection-classifier=both-addresses-and-ports:8/7 \
    src-address=10.10.10.1-10.10.10.254

/ip firewall nat
add action=passthrough chain=unused-hs-chain comment=\
    "place hotspot rules here" disabled=yes to-addresses=0.0.0.0
add action=masquerade chain=srcnat connection-mark=conn1 disabled=no \
    out-interface=pppoe-out1
add action=masquerade chain=srcnat connection-mark=conn2 disabled=no \
    out-interface=pppoe-out2
add action=masquerade chain=srcnat connection-mark=conn3 disabled=no \
    out-interface=pppoe-out3
add action=masquerade chain=srcnat connection-mark=conn4 disabled=no \
    out-interface=pppoe-out4
add action=masquerade chain=srcnat connection-mark=conn5 disabled=no \
    out-interface=pppoe-out5 src-address=10.10.10.1-10.10.10.254
add action=masquerade chain=srcnat connection-mark=conn6 disabled=no \
    out-interface=pppoe-out6 src-address=10.10.10.1-10.10.10.254
add action=masquerade chain=srcnat connection-mark=conn7 disabled=no \
    out-interface=pppoe-out7 src-address=10.10.10.1-10.10.10.254
add action=masquerade chain=srcnat connection-mark=conn8 disabled=no \
    out-interface=pppoe-out8 src-address=10.10.10.1-10.10.10.254
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
    disabled=no src-address=10.0.0.0/24 to-addresses=0.0.0.0
add action=masquerade chain=srcnat comment=PPPOE disabled=no src-address=\
    10.10.10.0/24

/ip hotspot profile
set [ find default=yes ] dns-name="" hotspot-address=0.0.0.0 html-directory=\
    hotspot http-cookie-lifetime=3d http-proxy=0.0.0.0:0 login-by=\
    cookie,http-chap name=default rate-limit="" smtp-server=0.0.0.0 \
    split-user-domain=no use-radius=no
add dns-name=www.shaban86.com hotspot-address=10.0.0.1 html-directory=hotspot \
    http-cookie-lifetime=3d http-proxy=0.0.0.0:0 login-by=cookie,http-chap \
    name=hsprof1 rate-limit="" smtp-server=0.0.0.0 split-user-domain=no \
    use-radius=no
/ip hotspot
add disabled=no idle-timeout=5m interface=Local keepalive-timeout=none name=\
    hotspot1 profile=hsprof1
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m name=default \
    shared-users=1 status-autorefresh=1m transparent-proxy=no
add idle-timeout=none keepalive-timeout=2m name=512k rate-limit=128k/1024k \
    shared-users=1 status-autorefresh=1m transparent-proxy=no
add idle-timeout=none keepalive-timeout=2m name=1M rate-limit=256k/1024k \
    shared-users=1 status-autorefresh=1m transparent-proxy=no
add idle-timeout=none keepalive-timeout=2m name=256k rate-limit=128k/256k \
    shared-users=1 status-autorefresh=1m transparent-proxy=no
add advertise=yes advertise-interval=1s advertise-timeout=immediately \
    advertise-url=http://10.0.0.1/end.html idle-timeout=none \
    keepalive-timeout=2m name=END open-status-page=always shared-users=1 \
    status-autorefresh=1m transparent-proxy=yes
add idle-timeout=none keepalive-timeout=2m name=2M rate-limit=256k/2048k \
    shared-users=1 status-autorefresh=1m transparent-proxy=no

/ip pool
add name=hs-pool-5 ranges=10.0.0.2-10.0.0.254
add name=PPPOE ranges=10.10.10.1-10.10.10.254
/ip dhcp-server
add address-pool=hs-pool-5 authoritative=after-2sec-delay bootp-support=\
    static disabled=no interface=Local lease-time=1h name=dhcp1

/ppp profile
set 0 change-tcp-mss=yes name=default only-one=default \
    remote-ipv6-prefix-pool=none use-compression=default use-encryption=\
    default use-ipv6=yes use-mpls=default use-vj-compression=default
add change-tcp-mss=default local-address=10.10.10.1 name=512k only-one=yes \
    rate-limit=128k/512k remote-address=PPPOE use-compression=default \
    use-encryption=default use-ipv6=yes use-mpls=default use-vj-compression=\
    default
add change-tcp-mss=default local-address=10.10.10.1 name="1.5 Mb" only-one=\
    yes rate-limit=256k/1500k remote-address=PPPOE use-compression=default \
    use-encryption=default use-ipv6=yes use-mpls=default use-vj-compression=\
    default
add change-tcp-mss=default local-address=10.10.10.1 name="8 Mb" only-one=yes \
    rate-limit=512k/8092k remote-address=PPPOE use-compression=default \
    use-encryption=default use-ipv6=yes use-mpls=default use-vj-compression=\
    default
add change-tcp-mss=default local-address=10.10.10.1 name=2Mb only-one=yes \
    rate-limit=256k/1500k remote-address=PPPOE use-compression=default \
    use-encryption=default use-ipv6=yes use-mpls=default use-vj-compression=\
    default
set 5 change-tcp-mss=yes name=default-encryption only-one=default \
    remote-ipv6-prefix-pool=none use-compression=default use-encryption=yes \
    use-ipv6=yes use-mpls=default use-vj-compression=default
/interface pppoe-client
add ac-name="" add-default-route=yes allow=pap,chap,mschap1,mschap2 \
    dial-on-demand=no disabled=no interface=WAN2 max-mru=1480 max-mtu=1480 \
    mrru=disabled name=pppoe-out5 password=44640783 profile=default \
    service-name="" use-peer-dns=no user=4195647@tedata.net.eg
add ac-name="" add-default-route=yes allow=pap,chap,mschap1,mschap2 \
    dial-on-demand=no disabled=no interface=WAN2 max-mru=1480 max-mtu=1480 \
    mrru=disabled name=pppoe-out6 password=44640783 profile=default \
    service-name="" use-peer-dns=no user=4195647@tedata.net.eg
add ac-name="" add-default-route=yes allow=pap,chap,mschap1,mschap2 \
    dial-on-demand=no disabled=no interface=WAN2 max-mru=1480 max-mtu=1480 \
    mrru=disabled name=pppoe-out7 password=44640783 profile=default \
    service-name="" use-peer-dns=no user=4195647@tedata.net.eg
add ac-name="" add-default-route=yes allow=pap,chap,mschap1,mschap2 \
    dial-on-demand=no disabled=no interface=WAN2 max-mru=1480 max-mtu=1480 \
    mrru=disabled name=pppoe-out8 password=44640783 profile=default \
    service-name="" use-peer-dns=no user=4195647@tedata.net.eg



/ip dhcp-server network
add address=10.0.0.0/24 comment="hotspot network" dhcp-option="" dns-server=\
    "" gateway=10.0.0.1 ntp-server="" wins-server=""
/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=2048KiB \
    max-udp-packet-size=4096 servers=163.121.128.134,163.121.128.135
/ip dns static
add address=208.67.222.222 disabled=no name=OpenDNS1 ttl=1d
add address=208.67.220.220 disabled=no name=OpenDNS2 ttl=1d
add address=8.8.8.8 disabled=no name=Google1 ttl=1d
add address=8.8.4.4 disabled=no name=Google2 ttl=1d



/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 \
    routing-mark=conn1 scope=255 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2 \
    routing-mark=conn2 scope=255 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out3 \
    routing-mark=conn3 scope=255 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out4 \
    routing-mark=conn4 scope=255 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out5 \
    routing-mark=conn5 scope=255 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out6 \
    routing-mark=conn6 scope=255 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out7 \
    routing-mark=conn7 scope=255 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out8 \
    routing-mark=conn8 scope=255 target-scope=10

تعليقات

عدد التعليقات : 0