الأربعاء، 24 فبراير 2016

شرح اعدادات الVPN من الالف الي الياء للميكروتك

شرح اعدادات الVPN من الالف الي الياء




Once logged in, click on the "PPP" tab on the left-side menu. You should have the "Interface" tab open. Now click on the  sign and select "PPTP Client"
(Please make sure you enter the correct details in the appropriate fields. Use the images as guides also)
This new window that you've opened is where you'll create your PPTP VPN connection. Please edit the settings as follows:
  • Name: In this field, you can enter anything you like, for example "HMA PPTP".
  • Max MTU and Max MRU: Leave these as default, so 1450
  • When you're done, please click on the "Dial Out" tab (right next to the "General" tab).
Now in the "Dial Out" tab, edit the settings as explained below:
  • Connect To: Pick any VPN server IP that you want to connect to from the VPN Control Panel and click on "Software & Help". Then click on "View" next to "Manually set-up VPN - No software"
  • User: Your HMA! account username
  • Password: Type your special PPTP password. It can be found by logging into the VPN Control Panel and clicking on "Software & Help". Then click on "View" next to "Manually set-up VPN - No software"
  • Allow: Leave all authentication methods checked, as it should be by default already.
  • Click on "OK" when you're done. (Please double-check all settings before clicking "OK")
Now please go to the "IP" tab on the left-side bar and select "Firewall". Click on the "NAT" tab and then click on  sign, as shown below.
You should be in the "General" settings now so please carry out the following:
  • In "Chain", select "srcnat" from the drop down menu
  • In "Out. Interface", select the name of the HMA PPTP connection you just created.
  • Click on the "Action" tab when you're done.
  • In the "Action" field, select "Masquerade" from the drop down menu.
  • Click "OK" when you're done.
Now that you're back to the "Firewall" window, click on the "Mangle" tab, click on the  sign:
  • In "Chain", select "prerouting" from the drop down menu.
  • In "Src. Adress", enter the IP range you want to have routed through the VPN connection. To route all IPs in the Mikrotik routers subnet (assuming the router is 192.168.5.1), enter "192.168.5.100-192.168.5.150".
  • When you're done, click on the "Action" tab
Now that you're in the "Action" tab, please edit the settings as explained below:
  • In the "Action" field, select "mark routing"from the drop-down menu.
  • In the "New Routing Mark" field, enter any name for the routing mark, e.g. "PPTP"
  • Check "Passthrough" option.
  • Click "OK", when you're done.
Now, click on "IP" (in the left side menu). In the "Routes List" window, click on "Routes" and then click on the  sign.
  • Dst. Address: has to be "0.0.0.0/0"
  • Gateway: Enter the name of the VPN connection you created. (in this case it's "HMA PPTP") from the drop down menu.
  • Routing Mark: Select the routing mark you created before. (e.g. "PPTP")
  • Click "OK" when you're done.
Now you'll need to adjust your DNS settings, so to do that please follow the steps below. To begin, go to "IP" in the left-side menu and then click "DNS".
  • Click on "Static" and then click on the  sign 
  • In the "Name" field, enter "OpenDNS1" ; "Address": "208.67.222.222" and click "OK".
  • Then click on the sign again but this time in the "Name" field, enter: "OpenDNS2" and in the "Address" field:"208.67.220.220" and click "OK" again.
  • Once again, click on the  sign, and now in the "Name" field, enter: "Google1" and in the "Address" field type: "8.8.8.8" and click "OK" again.
And one last time, click on the  sign, and in the "Name" field, enter: "Google2" and in the "Address" field type: "8.8.4.4" and click "OK" again.
  • Check "Allow Remote Requests".
  • Click "OK".

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

  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


شرح اضافه اكتر من DNS لتحسين التصفح في الميكروتك

  • Click on "Static" and then click on the  sign 
  • In the "Name" field, enter "OpenDNS1" ; "Address": "208.67.222.222" and click "OK".
  • Then click on the sign again but this time in the "Name" field, enter: "OpenDNS2" and in the "Address" field:"208.67.220.220" and click "OK" again.
  • Once again, click on the  sign, and now in the "Name" field, enter: "Google1" and in the "Address" field type: "8.8.8.8" and click "OK" again.
And one last time, click on the  sign, and in the "Name" field, enter: "Google2" and in the "Address" field type: "8.8.4.4" and click "OK" again.
  • Check "Allow Remote Requests".
  • Click "OK".