Follow us on...
Follow us on G+ Follow us on Twitter Follow us on Facebook Watch us on YouTube
Register
Page 1 of 3 123 LastLast
Results 1 to 15 of 31
  1. #1
    Status
    Offline
    kidx13's Avatar
    Member
    Join Date
    Aug 2010
    Posts
    197
    Reviews
    Read 0 Reviews
    Downloads
    1
    Uploads
    0
    Feedback Score
    0

    skript ketika external proxy mati

    bagaimana caranya membuat skript yang mendeteksi apakah komputer proxy sedang menyala atau tidak ?
    jika proxy external terdetekasi, maka akan digunakan untuk proxy lan dan hotspot.
    jika proxy external tidak terdeteksi, maka koneksi berjalan tanpa proxy

  2. #2
    Status
    Offline
    dylavig's Avatar
    Member Super Senior
    Join Date
    Jun 2008
    Location
    Medan
    Posts
    537
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    sdh pernah di bahas pny. coba search aja dl..

    itu pake netwatch kemudian eksekusi script

  3. #3
    Status
    Offline
    hikmahcell's Avatar
    Member Senior
    Join Date
    Apr 2009
    Location
    Tolitoli, Sulawesi Tengah, Indonesia, Indonesia
    Posts
    488
    Reviews
    Read 0 Reviews
    Downloads
    5
    Uploads
    0
    Feedback Score
    0
    Code:
    /tool netwatch
    add host=ip.proxy.server.mu interval=2s timeout=1s\
    down-script="/ip firewall nat disable [find comment=PROXY]"\
    up-script="/ip firewall nat enable [find comment=PROXY]"\
    disabled=no
    diNat [direct to proxynya] beri comment=PROXY

    Br.
    Last edited by hikmahcell; 25-02-2011 at 14:25.

  4. The Following 6 Users Say Thank You to hikmahcell For This Useful Post:


  5. #4
    Status
    Offline
    kidx13's Avatar
    Member
    Join Date
    Aug 2010
    Posts
    197
    Reviews
    Read 0 Reviews
    Downloads
    1
    Uploads
    0
    Feedback Score
    0
    Click here to enlarge Originally Posted by hikmahcell Click here to enlarge
    Code:
    /tool netwatch
    add host=ip.proxy.server.mu interval=2s timeout=1s\
    down-script="/ip firewall nat disable [find comment=PROXY]"\
    up-script="/ip firewall nat enable [find comment=PROXY]"\
    disabled=no
    diNat [direct to proxynya] beri comment=PROXY

    Br.
    apakah untuk external proxy tidak apa2 jika tetap membiarkan settingan proxy pada server profile dan transparent proxy tidak tercentang pada user profile ?
    apakah harus diubah juga ?

  6. #5
    Status
    Offline
    CaPunG's Avatar
    Member
    Join Date
    Oct 2007
    Location
    Pontianak
    Posts
    142
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0

    Talking Kondisi

    ada kalanya server proxy mengalami 'hang' akan tetapi kondisi eth dalam kondisi up...

    apabila script di atas diterapkan, maka kondisi tidak akan pernah 'disable'

    ada baiknya ditambahkan pemeriksaan kondisi eth pada server proxy menggunakan 'ping'...

    cmiiw... Click here to enlarge

    [SEARCH]

  7. #6
    Status
    Offline
    masterute's Avatar
    Newbie
    Join Date
    Jul 2010
    Posts
    22
    Reviews
    Read 0 Reviews
    Downloads
    2
    Uploads
    0
    Feedback Score
    0
    Gan.. tolongin ane gan...

    netwatch gak jalan lagi

  8. #7
    Status
    Offline
    boled's Avatar
    Member
    Join Date
    Aug 2009
    Location
    Cilacap
    Posts
    246
    Reviews
    Read 0 Reviews
    Downloads
    14
    Uploads
    1
    Feedback Score
    0
    mantap nech gan info nya...

  9. #8
    Status
    Offline
    ndasjowo's Avatar
    Member
    Join Date
    Mar 2010
    Location
    Boyolali - Solo - Sragen
    Posts
    267
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    Click here to enlarge Originally Posted by kidx13 Click here to enlarge
    bagaimana caranya membuat skript yang mendeteksi apakah komputer proxy sedang menyala atau tidak ?
    jika proxy external terdetekasi, maka akan digunakan untuk proxy lan dan hotspot.
    jika proxy external tidak terdeteksi, maka koneksi berjalan tanpa proxy
    Kalo itu gampang ...
    Tinggall disable nat nya ...

    tp kl services squid nya yang mati gimana ya .... Click here to enlargeClick here to enlarge

  10. #9
    Status
    Offline
    oktama's Avatar
    Forum Guru
    Join Date
    Jul 2008
    Location
    Jayapura
    Posts
    1,929
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    Click here to enlarge Originally Posted by ndasjowo Click here to enlarge
    Kalo itu gampang ...
    Tinggall disable nat nya ...

    tp kl services squid nya yang mati gimana ya .... Click here to enlargeClick here to enlarge
    idupin lagi Click here to enlarge

  11. #10
    Status
    Offline
    boled's Avatar
    Member
    Join Date
    Aug 2009
    Location
    Cilacap
    Posts
    246
    Reviews
    Read 0 Reviews
    Downloads
    14
    Uploads
    1
    Feedback Score
    0
    Click here to enlarge Originally Posted by ndasjowo Click here to enlarge
    Kalo itu gampang ...
    Tinggall disable nat nya ...

    tp kl services squid nya yang mati gimana ya .... Click here to enlargeClick here to enlarge
    iya nech betul2
    apakah ada perintah untuk cek port tertentu yaaa...?
    kalo ip di tambah dengan port dah ada yg coba lom yaaa?Click here to enlarge
    Last edited by boled; 25-03-2011 at 23:51.

  12. #11
    Status
    Offline
    adiputrolds's Avatar
    Forum Guru
    Join Date
    Oct 2008
    Posts
    1,485
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    kalo buat script nya di mikrotik
    mikrotik hanya bs ngecek dengan ping
    tp mikrotik gk pernah bs ngecek apakah proxy lagi hang atau tidak
    kadang proxy hang tp interface msh bs di ping

    saran kalo mau ngecek proxy hang atau tidak ya bikin script nya di mesin linux nya jangan di mikkrotik nya

  13. #12
    Status
    Offline
    sum14rdi's Avatar
    VIP Member
    Join Date
    Sep 2007
    Location
    Tambun-Bekasi
    Posts
    860
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    1 (100%)
    ini script untuk ngecheck apakah service squid dah jalan atau mati.
    buat file dengan nama check-squid (atau tersearah anda)
    Code:
    #!/bin/sh 
    PIDFILE=/var/log/squid/squid.pid 
    PID=-1 
    
    if [ -f "$PIDFILE" ]; then 
       read LINE < "$PIDFILE" 
       [ -z "${LINE//[0-9]/}" -a -d "/proc/$LINE" ] && PID="$LINE" 
       if [ -n "$PID" ]; then 
          exit 0 
       fi 
          /etc/init.d/squid start 
    fi
    rule:
    1. sesuaikan yang ini
    Code:
    PIDFILE=/var/log/squid/squid.pid
    dengan squid anda
    2. buat aja cron dengan durasi 5 atau 10 menit agar script diatas dieksekusi
    3. jangan tanya penjelasan script ini, karena saya juga comot dari googling dan sialnya gak tau nyomot dari mana Click here to enlarge
    4. sudah ditest di ubuntu 10.10

  14. The Following 2 Users Say Thank You to sum14rdi For This Useful Post:


  15. #13
    Status
    Offline
    Neo
    Neo's Avatar
    Member Super Senior
    Join Date
    Sep 2008
    Location
    26'S 1066'E
    Posts
    588
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    agan keblux deh coba'in..

  16. The Following User Says Thank You to Neo For This Useful Post:


  17. #14
    Status
    Offline
    cerief's Avatar
    Newbie
    Join Date
    Jul 2009
    Posts
    52
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    Click here to enlarge Originally Posted by sum14rdi Click here to enlarge
    ini script untuk ngecheck apakah service squid dah jalan atau mati.
    buat file dengan nama check-squid (atau tersearah anda)
    Code:
    #!/bin/sh 
    PIDFILE=/var/log/squid/squid.pid 
    PID=-1 
    
    if [ -f "$PIDFILE" ]; then 
       read LINE < "$PIDFILE" 
       [ -z "${LINE//[0-9]/}" -a -d "/proc/$LINE" ] && PID="$LINE" 
       if [ -n "$PID" ]; then 
          exit 0 
       fi 
          /etc/init.d/squid start 
    fi
    rule:
    1. sesuaikan yang ini
    Code:
    PIDFILE=/var/log/squid/squid.pid
    dengan squid anda
    2. buat aja cron dengan durasi 5 atau 10 menit agar script diatas dieksekusi
    3. jangan tanya penjelasan script ini, karena saya juga comot dari googling dan sialnya gak tau nyomot dari mana Click here to enlarge
    4. sudah ditest di ubuntu 10.10
    mau coba ah,,,, selama ini sih cuma script i mt aja, jadi walau squidnya bisa ngeping tapi klo squidnya hang ya wasalam musti disable manual NAT nya,,,

    izin nyobain,,, Click here to enlargeClick here to enlargeClick here to enlarge

  18. #15
    Status
    Offline
    chorzlet's Avatar
    Newbie
    Join Date
    Jul 2010
    Posts
    27
    Reviews
    Read 0 Reviews
    Downloads
    3
    Uploads
    0
    Feedback Score
    0
    kalau saya pakai ini

    /tools netwatch
    add comment="" disabled=no down-script="/ip firewall nat disable [/ip firewal\
    l nat find comment=\"TRANSPARENT PROXY\"]" host=(ip.proxy.kamu) interval=\
    10s timeout=6s up-script=":if ([/ping count=5 size=28]<2) \
    do={/ip firewall nat enable [/ip firewall nat find comment=\"TRANSPARENT \
    PROXY\"]} else={/ip firewall nat enable [/ip firewall nat find comment=\"\
    TRANSPARENT PROXY\"]}"

    *catatan di ip firewall NAT redirectnya dikasih comment TRANSPARENT PROXY

    fungsinya : jika status proxy up : ping ke google, kalau respon enable transparent proxy
    kalau ping ke google nggak respon trasparent proxy di disable

    jika proxy down langsung disable transparent proxy


    CMIIW.

 

 
Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 359
    Last Post: 17-03-2016, 18:38
  2. [ask] cara mengganti tulisan access deny ketika masuk perangkap proxy
    By wahyu_mikrotiker in forum General Networking
    Replies: 11
    Last Post: 26-10-2010, 18:41
  3. Dstnat untuk proxy external ke mikrotik dengan proxy internal
    By awarmanf in forum General Networking
    Replies: 3
    Last Post: 21-02-2010, 21:17
  4. Replies: 8
    Last Post: 08-11-2008, 09:02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •