Zapret İle Engelli Sitelere Giriş (Linux ve OpenWRT Router)

Daha önceki GoodbyeDPI İle Engelli Sitelere Giriş yazısında Windows için DPI engelini kaldırmanın yolunu anlatmıştım.
Bu yazımıda DPI nedir tekrardan bahsedeceğim ve Zapret ile Linux sunucularda/bilgisayarlar ve Linux tabanlı routerlar için aktif ve pasif DPI engelini kaldırmanın yolunu anlatacağım.

Not: Kurulum adımları 11.10.2024 tarihinde güncellenmiştir.



Pasif DPI Nedir?

Pasif DPI, istekte bulunduğunuz web adresi ile aranıza girerek siz sayfayı yükleyemeden 302 yönlendirme ile girmek istediğiniz web sayfası yerine sizi başka bir sayfaya yönlendiren sansür uygulamaktadır.



Aktif DPI Nedir?

Bu yöntem diğerine göre çok daha karışıktır. TCP düzeyinde istekleriniz filtrelenir. Girmek istediğiniz websitesinin IP adresi sansür listesinde bulunması durumunda, sadece sayfaya ulaşılamadı hatası alırsınız.

Türkiye’deki internet servis sağlayıcılar (ISP) bu iki sansür yöntemini de kullanmaktadır. Örneğin TurkTelekom Ev, VodafoneNet Ev ve Superonline Ev kullanıcılarında Pasif DPI kullanıluyor. Aktif DPI ise şimdilik sadece TurkTelekom Metro Ethernet hizmetinde karşılaştım.

Sizlere yapacağım anlatım TurkTelekom Metro Ethernet kullanan bir sunucuda aktif ve pasif DPI engelleme kaldırmaya yönelik olacaktır.



Zapret Kurulumu Öncesi DPI Kontrolü

Turk Telekom Metro Ethernet kullanan sunucumda engelli olduğunu bildiğim independentturkish.com referans alarak anlatımı yapacağım. Zapret öncesi independentturkish.com adresine HTTP ve HTTPS ile ayrı ayrı bağlanmayı deneyelim.

root@trweb:~# curl -I http://independentturkish.com
curl: (56) Recv failure: Connection reset by peer
root@trweb:~# curl -I https://independentturkish.com
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to independentturkish.com:443

Gördüğünüz gibi hem HTTP, hem de HTTPS isteği daha sunucuya erişmeye çalışmadan ISP tarafından sonlandırıldı ve Connection reset by peer ve SSL_ERROR_SYSCALL ile karşılaştık.



Zapret Kurulumu

Not: Kurulum adımları 11.10.2024 tarihinde güncellenmiştir.

İnternet servis sağlayıcınıza göre parametre denemek yerine aşağıdaki videodaki gibi otomatik parametre kontrolü yapabilirsiniz.

Artık parametre denemenize ve elle konfigürasyon dosyasını düzenlemenize gerek yoktur!

Zapret de GoodByeDPI gibi Rus bir programcının Linux sistemler için geliştirdiği bir yazılım. GitHub üzerinden açık kaynak kodlu olarak dağıtılmaktadır. Kurulum için öncelikle sunucumuza SSH ile bağlanalım ve /opt klasörüne giriş yapalım.

root@trweb:~# cd /opt
root@trweb:/opt#

git clone –depth 1 https://github.com/bol-van/zapret komutu ile programı sunucuya çekelim.

root@trweb:/opt#  git clone --depth 1 https://github.com/bol-van/zapret
Cloning into 'zapret'...
remote: Enumerating objects: 168, done.
remote: Counting objects: 100% (168/168), done.
remote: Compressing objects: 100% (145/145), done.
remote: Total 168 (delta 17), reused 132 (delta 12), pack-reused 0
Receiving objects: 100% (168/168), 1.92 MiB | 3.65 MiB/s, done.
Resolving deltas: 100% (17/17), done.
root@trweb:/opt#

zapret klasörüne girelim ve config dosyasını nano ile düzenleyelim.

root@trweb:/opt# cd zapret/
root@trweb:/opt/zapret# nano config

NFQWS_OPT_DESYNC satırı hariç tüm satırları diez (#) işareti ile pasif duruma getirelim.

NFQWS_OPT_DESYNC satırı değerini aşağıdaki gibi değiştirelim.

NFQWS_OPT_DESYNC="--dpi-desync --dpi-desync-ttl=9 --dpi-desync-fooling=md5sig --dpi-desync-skip-nosni=0 --dpi-desync-fwmark=0x40000000 --dpi-desync-retrans=0"

config dosyasının son hali aşağıdaki gibi olmalıdır.

# this file is included from init scripts
# change values here

# can help in case /tmp has not enough space
#TMPDIR=/opt/zapret/tmp

# options for ipsets
# too low hashsize can cause memory allocation errors on low RAM systems , even if RAM is enough
# too large hashsize will waste lots of RAM
IPSET_OPT="hashsize 262144 maxelem 2097152"

# options for ip2net. "-4" or "-6" auto added by ipset create script
IP2NET_OPT4="--prefix-length=22-30 --v4-threshold=3/4"
IP2NET_OPT6="--prefix-length=56-64 --v6-threshold=5"

# CHOOSE OPERATION MODE
# MODE : nfqws,tpws,filter,custom
# nfqws : use nfqws
# tpws : use tpws
# filter : no daemon, just create ipset or download hostlist
# custom : custom mode. should modify custom init script and add your own code
MODE=nfqws
# apply fooling to http
MODE_HTTP=1
# for nfqws only. support http keep alives. enable only if DPI checks for http request in any outgoing packet
MODE_HTTP_KEEPALIVE=1
# apply fooling to https
MODE_HTTPS=1
# none,ipset,hostlist
MODE_FILTER=none

# CHOOSE NFQWS DAEMON OPTIONS for DPI desync mode. run "nfq/nfqws --help" for option list
DESYNC_MARK=0x40000000
#NFQWS_OPT_DESYNC="--dpi-desync=fake --dpi-desync-ttl=0 --dpi-desync-fooling=badsum --dpi-desync-fwmark=$DESYNC_MARK"
NFQWS_OPT_DESYNC="--dpi-desync --dpi-desync-ttl=9 --dpi-desync-fooling=md5sig --dpi-desync-skip-nosni=0 --dpi-desync-fwmark=0x40000000 --dpi-desync-retrans=0"


# CHOOSE TPWS DAEMON OPTIONS. run "tpws/tpws --help" for option list
TPWS_OPT="--hostspell=HOST --split-http-req=method --split-pos=3"

# openwrt only : donttouch,none,software,hardware
FLOWOFFLOAD=donttouch

# for routers based on desktop linux only. has not effect in openwrt.
# CHOOSE LAN and WAN NETWORK INTERFACES
# or leave them commented if its not router
#IFACE_LAN=eth0
#IFACE_WAN=eth1

# should init scripts apply firewall rules ?
# set to 0 if firewall control system is present
# openwrt uses fw3 firewall , init never touch fw
INIT_APPLY_FW=1

# do not work with ipv4
#DISABLE_IPV4=1
# do not work with ipv6
DISABLE_IPV6=1

# select which init script will be used to get ip or host list
# possible values : get_user.sh get_antizapret.sh get_combined.sh get_reestr.sh get_hostlist.sh
# comment if not required
#GETLIST=

Düzenlediğim ayarlar Turk Telekom ile Netflix izlenebilecek şekilde tarafımdam test edilmiş olup aktif olarak kullandığım ayarlardır.

install_easy.sh dosyasını çalıştırarak kuruluma başlayalım.

root@trweb:/opt/zapret# ./install_easy.sh

Kurulum dosyası gerekli bileşenleri yükleyecektir.

Kurulum sırasında IPv6 isteyip istemediğinizi soracaktır. N ile kuruluma devam edelim.

enable ipv6 support (default : Y) (Y/N) ? N

Kurulum yapılan cihazın router olup olmadığını soracaktır. Linux sunucu veya masaüstü kullanıyorsanız N ile kuruluma devam etmelisiniz. Zapret OpenWRT gibi bir routera da kurulabildiği için size bunu sormaktadır. Eğer OpenWRT gibi bir router üzerine kurulum yapıyorsanız Y ile devam etmelisiniz.

is this system a router (default : N) (Y/N) ? N

Zapret’i hangi mod ile çalıştıracağımız soracaktır. Kullanacağımız mod nfqws Karşılığı olarak 2 yazıp devam ediyoruz.

select MODE :
1 : tpws
2 : nfqws
3 : filter
4 : custom
your choice (default : nfqws) :

Programı HTTP siteler için aktif edeceğiz. Y ile devam ediyoruz.

enable http support (default : Y) (Y/N) ? Y

HTTP siteler için Keep Alive özelliğini aktif edeceğiz. Y ile devam ediyoruz.

enable keep alive support only if DPI checks every outgoing packet for http signature
dont enable otherwise because it consumes more cpu resources
enable http keep alive support (default : Y) (Y/N) ? Y

Programı HTTPS siteler için aktif edeceğiz. Y ile devam ediyoruz.

enable https support (default : Y) (Y/N) ? Y

Fitreleme seçeneğini soracaktır. None seçeneği olan 1 ile devam ediyoruz.

select filtering :
1 : none
2 : ipset
3 : hostlist
your choice (default : none) : 1

press enter to continue ibaresini gördükten sonra enter tuşu ile kurulumu bitiriyoruz.



Zapret Kurulumu Öncesi DPI Kontrolü

Zapret kurulumu öncesi referans aldığım independentturkish.com adresine HTTP ve HTTPS istek gönderecek tekrardan deneyelim.

root@trweb:/opt/zapret# curl -I https://independentturkish.com
HTTP/2 301
date: Tue, 05 May 2020 20:36:21 GMT
content-type: text/html; charset=iso-8859-1
set-cookie: __cfduid=d26de2100fd3fcc3feb370f2625c06fbc1588710981; expires=Thu, 04-Jun-20 20:36:21 GMT; path=/; domain=.independentturkish.com; HttpOnly; SameSite=Lax; Secure
x-content-type-options: nosniff
location: http://www.independentturkish.com/
cache-control: max-age=1209600
expires: Fri, 15 May 2020 11:24:34 GMT
x-request-id: v-55ca9606-8b9e-11ea-b190-a31b3bc641f2
age: 378706
via: varnish
x-cache: HIT
x-cache-hits: 318
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 58ed40d2ef0cc2ea-FRA
cf-request-id: 028826d7d50000c2ead410d200000001
root@trweb:/opt/zapret# curl -I https://independentturkish.com
HTTP/2 301
date: Tue, 05 May 2020 20:38:07 GMT
content-type: text/html; charset=iso-8859-1
set-cookie: __cfduid=da4289f5d7d0fbcce329ec66634deb7541588711087; expires=Thu, 04-Jun-20 20:38:07 GMT; path=/; domain=.independentturkish.com; HttpOnly; SameSite=Lax; Secure
x-content-type-options: nosniff
location: http://www.independentturkish.com/
cache-control: max-age=1209600
expires: Fri, 15 May 2020 11:24:34 GMT
x-request-id: v-55ca9606-8b9e-11ea-b190-a31b3bc641f2
age: 378812
via: varnish
x-cache: HIT
x-cache-hits: 319
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 58ed4369598505c4-FRA
cf-request-id: 02882875d9000005c421a2a200000001

Gördüğünüz gibi engelli olan siteye kolayca erişim sağlayabildik.



Zapret Programının Kaldırılması

/opt/zapret altında yer alan uninstall_easy.sh komutunu çalıştırarak kolayca programı kaldırabilirsiniz.

root@trweb:~# cd /opt/zapret/
root@trweb:/opt/zapret# ./uninstall_easy.sh
* checking system
system is based on systemd
* stopping zapret service
Removed /etc/systemd/system/zapret.service.
Removed /etc/systemd/system/multi-user.target.wants/zapret.service.
* removing zapret service
* removing zapret-list-update timer
Removed /etc/systemd/system/timers.target.wants/zapret-list-update.timer.
Removed /etc/systemd/system/zapret-list-update.timer.
* removing crontab entry

press enter to continue

İyi günlerde kullanmanız dileğiyle

“Zapret İle Engelli Sitelere Giriş (Linux ve OpenWRT Router)” üzerine 47 yorum

  1. merhabalar yazınız gayet açıklayıcı ve öğretici olmuş ellerinize sağlık rica etsem zapreti android cihazlar için kurulumunu anlatan biryazı paylaşabilir misiniz şimdiden teşekkür ederim

    Yanıtla
  2. Hocam Zapret in sürümü değişmiş galiba, içindeki kodlar farklı. sizin bahsettiğiniz gibi yapamadım. yeni sürüme göre tekrar yayınlar mısınız?

    Yanıtla
  3. Merhaba,

    Zapret’i Openwrt’ye kurmaya çalışırken ilgili dizinde “./install_easy.sh” komutunu çalıştırdığım zaman “-ash: ./install_easy.sh: Permission denied” hatasını alıyorum.

    Problemin çözümüyle alakalı herhangi bir fikriniz var mı?

    Teşekkürler.

    Yanıtla
    • Merhabalar,

      Komutu çalıştırmadan önce
      chmod +x install_easy.sh
      yapıp deneyebilir misiniz?

      Eğer yine aynı hata ile karşılaşırsanız bu sefer de
      chmod 777 install_easy.sh
      ile denemenizi öneririm.

      Yanıtla
      • Yanıtınız için çok teşekkürler. Verdiğiniz komutu çalıştırıp, sonrasında install komutunu çalıştırınca da aşağıdaki hatayı verdi;

        * checking system
        system is based on openwrt
        * checking executables
        ./install_easy.sh: line 172: /tmp/zapret/install_bin.sh: Permission denied
        build tools not found

        Yanıtla
        • Paylaştığınız komutun aynısını hatada yazdığı “install_bin.sh” dosyası için de çalıştırdığım zaman sonraki aşamaya geçebildim.

          Olacak gibi gözüküyor, bakalım.

          Tekrar hızlı dönüşünüz için teşekkür ederim.

          Yanıtla
          • Zaten yapılması gerekeni siz bulmuşsunuz.

            sh dosyaları hata verdiğinde, kurulum çalışmadığında chmod ile yetkilendirme yapmanız yeterli olacaktır.

            Kolay gelsin dilerim

            Yanıtla
  4. Hocam rica etsem Keenetic model modemler için bir rehber oluşturabilir misiniz? OpenWRT’e gerek duymadan opkg ile OpenWRT bileşenlerini kurabiliyor ancak bu easy install ile uyumlu değil. “system is not either systemd based or openwrt. check readme.txt for manual setup info.” hatası veriyor. Manual kurulum yapacak kadar da becerikli değilim :) Eğer bir şeyler yapabilirseniz çok iyi olur, şimdiden teşekkür ederim.

    Yanıtla
  5. Manual kurulum için anlatım yapabilir misin rica etsem? Zapret manuel kurulum yapmamı istiyor Keenetic modemde :)

    Yanıtla
    • Merhabalar,
      En kısa zamanda Linux sunucuda manuel kurulum deneyerek sizi bilgilendireceğim.
      Daha önce de bahsettiğim gibi elimde Keenetic cihaz olmadığından dolayı, o sisteme çok yabancıyım :)

      Yanıtla
    • Keenetic için ne yazık ki manuel kurulum durumu söz konusu değil.
      Açık kaynak Linux tabanlı router yazılımlarında, OpenWRT, pfSense, OPNSense kurulum yapılabilmekte.

      Yanıtla
  6. Merhabalar, pi-hole kullandığım raspberry zero’ya zapret kurmaya çalışırken şu hata ile karşılaşıyorum hocam.
    Çözümü hakkında bilgi bulamadım, yardımcı olabilir misiniz?

    pi@raspberrypi:/opt/zapret $ sudo ./install_easy.sh
    * checking system
    system is based on systemd
    * checking executables
    Illegal instruction
    trying to compile
    make: Entering directory ‘/opt/zapret’
    make[1]: Entering directory ‘/opt/zapret/nfq’
    rm -f nfqws dvtws *.o
    make[1]: Leaving directory ‘/opt/zapret/nfq’
    make[1]: Entering directory ‘/opt/zapret/tpws’
    rm -f tpws *.o
    make[1]: Leaving directory ‘/opt/zapret/tpws’
    make[1]: Entering directory ‘/opt/zapret/ip2net’
    rm -f ip2net *.o
    make[1]: Leaving directory ‘/opt/zapret/ip2net’
    make[1]: Entering directory ‘/opt/zapret/mdig’
    rm -f mdig *.o
    make[1]: Leaving directory ‘/opt/zapret/mdig’
    make[1]: Entering directory ‘/opt/zapret/nfq’
    cc -s -std=gnu99 -Wno-logical-op-parentheses -O3 -o nfqws *.c crypto/*.c -lnetfilter_queue -lnfnetlink -lz
    In file included from nfqws.c:4:
    sec.h:9:10: fatal error: sys/capability.h: No such file or directory
    #include
    ^~~~~~~~~~~~~~~~~~
    compilation terminated.
    In file included from sec.c:5:
    sec.h:9:10: fatal error: sys/capability.h: No such file or directory
    #include
    ^~~~~~~~~~~~~~~~~~
    compilation terminated.
    make[1]: *** [Makefile:12: nfqws] Error 1
    make[1]: Leaving directory ‘/opt/zapret/nfq’
    make: *** [Makefile:6: all] Error 2
    make: Leaving directory ‘/opt/zapret’
    could not compile
    make: Entering directory ‘/opt/zapret’
    make[1]: Entering directory ‘/opt/zapret/nfq’
    rm -f nfqws dvtws *.o
    make[1]: Leaving directory ‘/opt/zapret/nfq’
    make[1]: Entering directory ‘/opt/zapret/tpws’
    rm -f tpws *.o
    make[1]: Leaving directory ‘/opt/zapret/tpws’
    make[1]: Entering directory ‘/opt/zapret/ip2net’
    rm -f ip2net *.o
    make[1]: Leaving directory ‘/opt/zapret/ip2net’
    make[1]: Entering directory ‘/opt/zapret/mdig’
    rm -f mdig *.o
    make[1]: Leaving directory ‘/opt/zapret/mdig’
    make: Leaving directory ‘/opt/zapret’

    Yanıtla
    • Merhaba,
      Kaynaktan derleme için gerekli programlar eksik gibi görünüyor.
      Aşağıdaki komutla gerekli yazılımları yükleyerek, tekrardan kurulum denemenizi öneriyorum.

      sudo apt update
      sudo apt install build-essential clang flex g++ gawk gcc-multilib gettext \
      git libncurses5-dev libssl-dev python3-distutils rsync unzip zlib1g-dev \
      file wget

      Yanıtla
  7. Xiaomi 4A Giga’da OpenWRT kullanıyorum. Hangi ayarları kullanmalıyım? Varsayılan olarak gelen ayarlar:
    NFQWS_OPT_DESYNC=”–dpi-desync=fake –dpi-desync-ttl=0 –dpi-desync-ttl6=0 –dpi-desync-fooling=badsum”

    Yanıtla
  8. Merhabalar
    Keenetic cihazımda adımlarınızı takip ettim
    OPKG ile kurulum mümkün ancak çalışıp çalışmadığını halen daha çözemedim. İSS Turkcell SUperonline

    Yanıtla
    • Merhabalar,
      Yazı içerisinde örnek verdiğim şekilde curl komutu ile engelli bir siteye bağlantı yapmaya sağladığınızda, örnekteki gibi çıktıyı almanız gerekir.
      Engelli ve engel aşılmış şekilde örnek olarak farklı çıktılar gösterilmiştir.

      Yanıtla
  9. Raspberry Pi Zero 2 W aldım Pi-Hole ve Unbound kurdum. Zapret’i de kurdum çalışıyor ama ben tüm ağda çalışmasını istiyorum. Nasıl yapabilirim?

    Yanıtla
    • Tüm ağda çalışması için, router cihazınızda kurulum yapmanız gerekiyor.
      Tüm ağı yöneten cihazda kurulum yapılırsa eğer, ağdaki tüm cihazlarda kullanım yapabilirsiniz.

      Yanıtla
  10. Rehber için çok teşekkürler. Openwrt üzerinden kurulum yaptım ancak superonline altyapısı üzerinden millenicom için çalışan bir ayar bulamadım. blockcheck üzerinden pastebin için deniyorum ancak o da yarım saattir deniyor bulamıyor. Program artık çalışmıyor mu yoksa ben mi bir yerde hata yaptım? Yardımcı olabilirseniz sevinirim. İyi çalışmalar

    Yanıtla
    • Merhaba
      Program sorunsuca çalışıyor. Başka bir site deneyebilirsin ya da Superonline ile kullandığım ayarı deneyebilirsiniz.

      NFQWS_OPT_DESYNC=”–dpi-desync=fake –dpi-desync-ttl=2″

      Yanıtla
  11. Geri döndüğünüz için teşekkürler hocam. Maalesef hala çalışmıyor. Goodbyedpi anycountry_dnsredir ile her yere girebiliyorum. Openwrt ile tüm cihazlara bunu yaymak istemiştim ama zapreti bir türlü beceremedim. Configi doğru düzenleyebiliyor muyum inceleyebilir misiniz?

    # this file is included from init scripts
    # change values here

    # can help in case /tmp has not enough space
    #TMPDIR=/opt/zapret/tmp

    # redefine user for zapret daemons. required on Keenetic
    #WS_USER=nobody

    # override firewall type : iptables,nftables,ipfw
    FWTYPE=nftables

    # options for ipsets
    # maximum number of elements in sets. also used for nft sets
    SET_MAXELEM=522288
    # too low hashsize can cause memory allocation errors on low RAM systems , even if RAM is enough
    # too large hashsize will waste lots of RAM
    IPSET_OPT=”hashsize 262144 maxelem $SET_MAXELEM”
    # dynamically generate additional ip. $1 = ipset/nfset/table name
    #IPSET_HOOK=”/etc/zapret.ipset.hook”

    # options for ip2net. “-4” or “-6″ auto added by ipset create script
    IP2NET_OPT4=”–prefix-length=22-30 –v4-threshold=3/4″
    IP2NET_OPT6=”–prefix-length=56-64 –v6-threshold=5″
    # options for auto hostlist
    AUTOHOSTLIST_RETRANS_THRESHOLD=3
    AUTOHOSTLIST_FAIL_THRESHOLD=3
    AUTOHOSTLIST_FAIL_TIME=60
    # 1 = debug autohostlist positives to ipset/zapret-hosts-auto-debug.log
    AUTOHOSTLIST_DEBUGLOG=0

    # number of parallel threads for domain list resolves
    MDIG_THREADS=30

    # ipset/*.sh can compress large lists
    GZIP_LISTS=1
    # command to reload ip/host lists after update
    # comment or leave empty for auto backend selection : ipset or ipfw if present
    # on BSD systems with PF no auto reloading happens. you must provide your own command
    # set to “-” to disable reload
    #LISTS_RELOAD=”pfctl -f /etc/pf.conf”

    # override ports
    #HTTP_PORTS=80-81,85
    #HTTPS_PORTS=443,500-501
    #QUIC_PORTS=443,444

    # CHOOSE OPERATION MODE
    # MODE : nfqws,tpws,tpws-socks,filter,custom
    # nfqws : nfqws for dpi desync
    # tpws : tpws transparent mode
    # tpws-socks : tpws socks mode
    # filter : no daemon, just create ipset or download hostlist
    # custom : custom mode. should modify custom init script and add your own code
    MODE=nfqws
    # apply fooling to http
    MODE_HTTP=1
    # for nfqws only. support http keep alives. enable only if DPI checks for http request in any outgoing packet
    MODE_HTTP_KEEPALIVE=0
    # apply fooling to https
    MODE_HTTPS=1
    # apply fooling to quic
    MODE_QUIC=0
    # none,ipset,hostlist,autohostlist
    MODE_FILTER=none

    # CHOOSE NFQWS DAEMON OPTIONS for DPI desync mode. run “nfq/nfqws –help” for option list
    DESYNC_MARK=0x40000000
    DESYNC_MARK_POSTNAT=0x20000000
    NFQWS_OPT_DESYNC=”–dpi-desync=fake –dpi-desync-ttl=2″–dpi-desync-ttl6=0 –dpi-desync-fooling=badsum”
    #NFQWS_OPT_DESYNC_HTTP=”–dpi-desync=split –dpi-desync-ttl=0 –dpi-desync-fooling=badsum”
    #NFQWS_OPT_DESYNC_HTTPS=”–wssize=1:6 –dpi-desync=split –dpi-desync-ttl=0 –dpi-desync-fooling=badsum”
    #NFQWS_OPT_DESYNC_HTTP6=”–dpi-desync=split –dpi-desync-ttl=5 –dpi-desync-fooling=none”
    #NFQWS_OPT_DESYNC_HTTPS6=”–wssize=1:6 –dpi-desync=split –dpi-desync-ttl=5 –dpi-desync-fooling=none”
    NFQWS_OPT_DESYNC_QUIC=”–dpi-desync=fake –dpi-desync-repeats=6″
    #NFQWS_OPT_DESYNC_QUIC6=”–dpi-desync=hopbyhop”

    # CHOOSE TPWS DAEMON OPTIONS. run “tpws/tpws –help” for option list
    TPWS_OPT=”–hostspell=HOST –split-http-req=method –split-pos=3 –oob”

    # openwrt only : donttouch,none,software,hardware
    FLOWOFFLOAD=donttouch

    # openwrt: specify networks to be treated as LAN. default is “lan”
    #OPENWRT_LAN=”lan lan2 lan3″
    # openwrt: specify networks to be treated as WAN. default wans are interfaces with default route
    #OPENWRT_WAN4=”wan vpn”
    #OPENWRT_WAN6=”wan6 vpn6″

    # for routers based on desktop linux and macos. has no effect in openwrt.
    # CHOOSE LAN and optinally WAN/WAN6 NETWORK INTERFACES
    # or leave them commented if its not router
    # it’s possible to specify multiple interfaces like this : IFACE_LAN=”eth0 eth1 eth2″
    # if IFACE_WAN6 is not defined it take the value of IFACE_WAN
    #IFACE_LAN=eth0
    #IFACE_WAN=eth1
    #IFACE_WAN6=”ipsec0 wireguard0 he_net”

    # should start/stop command of init scripts apply firewall rules ?
    # not applicable to openwrt with firewall3+iptables
    INIT_APPLY_FW=1
    # firewall apply hooks
    #INIT_FW_PRE_UP_HOOK=”/etc/firewall.zapret.hook.pre_up”
    #INIT_FW_POST_UP_HOOK=”/etc/firewall.zapret.hook.post_up”
    #INIT_FW_PRE_DOWN_HOOK=”/etc/firewall.zapret.hook.pre_down”
    #INIT_FW_POST_DOWN_HOOK=”/etc/firewall.zapret.hook.post_down”

    # do not work with ipv4
    #DISABLE_IPV4=1
    # do not work with ipv6
    DISABLE_IPV6=1

    # select which init script will be used to get ip or host list
    # possible values : get_user.sh get_antizapret.sh get_combined.sh get_reestr.sh get_hostlist.sh
    # comment if not required
    #GETLIST=

    Yanıtla
    • Tekrardan merhaba,

      NFQWS_OPT_DESYNC seçeneği hatalı görünüyor. Tüm satırı silip NFQWS_OPT_DESYNC=”–dpi-desync=fake –dpi-desync-ttl=2″ olarak değiştirin
      Ayrıca NFQWS_OPT_DESYNC_QUIC başına diez # koyun

      Openwrt için kurulum /opt klasörü altında zapret ismiyle yapılmalıdır.
      Kurulum öncesinde install_prereq.sh ve install_bin.sh çalıştırılmalı, daha sonrasında install_bin.sh ve install_bin.sh ile kurulum yapılmadır.
      Sanıyorum ki gerekli modüller olmadığından dolayı router üzerindne çalışmıyor.

      Örnek olarak çalışan conf dosyamı aşağıda paylaşıyorum.


      # this file is included from init scripts
      # change values here

      # can help in case /tmp has not enough space
      #TMPDIR=/opt/zapret/tmp

      # redefine user for zapret daemons. required on Keenetic
      #WS_USER=nobody

      # override firewall type : iptables,nftables,ipfw
      FWTYPE=nftables

      # options for ipsets
      # maximum number of elements in sets. also used for nft sets
      SET_MAXELEM=522288
      # too low hashsize can cause memory allocation errors on low RAM systems , even if RAM is enough
      # too large hashsize will waste lots of RAM
      IPSET_OPT="hashsize 262144 maxelem $SET_MAXELEM"
      # dynamically generate additional ip. $1 = ipset/nfset/table name
      #IPSET_HOOK="/etc/zapret.ipset.hook"

      # options for ip2net. "-4" or "-6" auto added by ipset create script
      IP2NET_OPT4="--prefix-length=22-30 --v4-threshold=3/4"
      IP2NET_OPT6="--prefix-length=56-64 --v6-threshold=5"
      # options for auto hostlist
      AUTOHOSTLIST_RETRANS_THRESHOLD=3
      AUTOHOSTLIST_FAIL_THRESHOLD=3
      AUTOHOSTLIST_FAIL_TIME=60
      # 1 = debug autohostlist positives to ipset/zapret-hosts-auto-debug.log
      AUTOHOSTLIST_DEBUGLOG=0

      # number of parallel threads for domain list resolves
      MDIG_THREADS=30

      # ipset/*.sh can compress large lists
      GZIP_LISTS=1
      # command to reload ip/host lists after update
      # comment or leave empty for auto backend selection : ipset or ipfw if present
      # on BSD systems with PF no auto reloading happens. you must provide your own command
      # set to "-" to disable reload
      #LISTS_RELOAD="pfctl -f /etc/pf.conf"

      # override ports
      #HTTP_PORTS=80-81,85
      #HTTPS_PORTS=443,500-501
      #QUIC_PORTS=443,444

      # CHOOSE OPERATION MODE
      # MODE : nfqws,tpws,tpws-socks,filter,custom
      # nfqws : nfqws for dpi desync
      # tpws : tpws transparent mode
      # tpws-socks : tpws socks mode
      # filter : no daemon, just create ipset or download hostlist
      # custom : custom mode. should modify custom init script and add your own code
      MODE=nfqws
      # apply fooling to http
      MODE_HTTP=1
      # for nfqws only. support http keep alives. enable only if DPI checks for http request in any outgoing packet
      MODE_HTTP_KEEPALIVE=0
      # apply fooling to https
      MODE_HTTPS=1
      # apply fooling to quic
      MODE_QUIC=1
      # none,ipset,hostlist,autohostlist
      MODE_FILTER=none

      # CHOOSE NFQWS DAEMON OPTIONS for DPI desync mode. run "nfq/nfqws --help" for option list
      DESYNC_MARK=0x40000000
      DESYNC_MARK_POSTNAT=0x20000000
      NFQWS_OPT_DESYNC="--dpi-desync=fake --dpi-desync-ttl=2"
      #NFQWS_OPT_DESYNC_HTTP=
      #NFQWS_OPT_DESYNC_HTTPS=
      #NFQWS_OPT_DESYNC_HTTP6=
      #NFQWS_OPT_DESYNC_HTTPS6=
      #NFQWS_OPT_DESYNC_QUIC=
      #NFQWS_OPT_DESYNC_QUIC6=

      # CHOOSE TPWS DAEMON OPTIONS. run "tpws/tpws --help" for option list
      TPWS_OPT="--hostspell=HOST --split-http-req=method --split-pos=3 --oob"

      # openwrt only : donttouch,none,software,hardware
      FLOWOFFLOAD=donttouch

      # openwrt: specify networks to be treated as LAN. default is "lan"
      #OPENWRT_LAN="lan lan2 lan3"
      # openwrt: specify networks to be treated as WAN. default wans are interfaces with default route
      #OPENWRT_WAN4="wan vpn"
      #OPENWRT_WAN6="wan6 vpn6"

      # for routers based on desktop linux and macos. has no effect in openwrt.
      # CHOOSE LAN and optinally WAN/WAN6 NETWORK INTERFACES
      # or leave them commented if its not router
      # it's possible to specify multiple interfaces like this : IFACE_LAN="eth0 eth1 eth2"
      # if IFACE_WAN6 is not defined it take the value of IFACE_WAN
      #IFACE_LAN=eth0
      #IFACE_WAN=eth1
      #IFACE_WAN6="ipsec0 wireguard0 he_net"

      # should start/stop command of init scripts apply firewall rules ?
      # not applicable to openwrt with firewall3+iptables
      INIT_APPLY_FW=1
      # firewall apply hooks
      #INIT_FW_PRE_UP_HOOK="/etc/firewall.zapret.hook.pre_up"
      #INIT_FW_POST_UP_HOOK="/etc/firewall.zapret.hook.post_up"
      #INIT_FW_PRE_DOWN_HOOK="/etc/firewall.zapret.hook.pre_down"
      #INIT_FW_POST_DOWN_HOOK="/etc/firewall.zapret.hook.post_down"

      # do not work with ipv4
      #DISABLE_IPV4=1
      # do not work with ipv6
      DISABLE_IPV6=1

      # select which init script will be used to get ip or host list
      # possible values : get_user.sh get_antizapret.sh get_combined.sh get_reestr.sh get_hostlist.sh
      # comment if not required
      #GETLIST=

      Yanıtla
  12. Hocam maalesef hala girmek istediğim programa giremiyorum. Dünden beri çeşitli ayarlar denedim. Twps ve twps-socks ile girmek istediğim programa girebiliyorum ama Twitter, Edevlet gibi siteler açılmıyor bu sefer. Nfqws seçtiğimde bütün siteler açılıyor ama girmek istediğim program açılmıyor. İşin ilginci Türk Telekom kullanırken hiçbir dns ayarı bile olmadan program çalışıyordu Superonline altyapısına geçince çalışmaz oldu. Config düzenlerken filezilla üzerinden wordpad ile edit yapıyorum. Bunla ilgisi olabilir mi?

    Yanıtla
  13. Hocam çok teşekkürler yardımlarınız için. Programın bağlandığı siteyi bulup blockcheck ile deneyince sonunda başardım. Tekrardan teşekkürler kendim halledemezdim.

    Yanıtla
  14. Openwrt son sürümü ile denedim ama işe yaramadı. Türk Telekom altyapısını kullanan Netservices firmasıni kullanıyorum. Acaba nasıl yapabilirim?

    Yanıtla
  15. Öncelikle teşekkür ederim çok faydanız dokundu. Bunu sonradan okuyan arkadaşlar için birkaç not düşmek istiyorum. Ben Mi Router 4A kullanıyorum ve 8 MiB gibi kısıtlı bir alanım var. Zapret’i bu tür düşük depolamalı cihazlara kurmak istiyorsanız iki önerim var. Birincisi “binaries” dizini içerisindeki alakasız mimarileri silmeniz. Sadece hedef cihazınızın mimarisini kullanırsanız inanılmaz yer kazanırsınız. İkincisi ise git kullanmak yerine önce bilgisayarınıza indirip sonra SCP kullanarak cihaza aktarmanız. Git çok ağır bir program olduğu için fazla yer kaplayabilir, hatta benim bütün alanımı kullanmıştı ve üzerine yer yetmemişti. Bu ikisini yaparak zapret’i routerime kurmayı başardım. Sebebini bilmiyorum ama bazen blockcheck scripti çalışmayabiliyor. Zaten 1-2 kez çalıştırmanız gereken bir şey olduğu için çok önemi de yok. Hiçbir bypass yöntemi bulamazsa cihazınızı yeniden başlatıp tekrar deneyin muhtemelen çözülür. En sonunda zapret’in kapladığı alan 3 MB civarında. Amacınız zapret kullanmaksa cihazınızı ona göre seçmenizde fayda var. 1 MB hafızalı cihazlar yetersiz gelebilir.

    Yanıtla
  16. uygun parametreleri koymuş olmama rağmen hala sitelere giriş yapamıyorum kablonet kullanıyorum onunla mı ilgisi var sizce ama goodbyedpi ile girebildigim sitelerede giremiyorum zapret ile service çalışıyo gösterior kontrol ettiğimde sorun nedir sizce ?

    Yanıtla
  17. çalıştırdığımda aldığım sonuc
    root@OpenWrt:~# service zapret restart
    Clearing nftables
    Starting daemon 1: /opt/zapret/nfq/nfqws –qnum=200 –user=daemon –dpi-desync-fwmark=0x40000000 –dpi-desync=fake –dpi-desync-ttl=9
    Starting daemon 10: /opt/zapret/nfq/nfqws –qnum=210 –user=daemon –dpi-desync-fwmark=0x40000000 –dpi-desync=fake –dpi-desync-ttl=9
    Applying nftables
    Creating ip list table (firewall type nftables)
    setting high oom kill priority
    reloading nftables set backend (no-update)
    Adding nftables ipv4 rule for nfqws postrouting (qnum 200) : tcp dport {80} mark and 0x40000000 == 0
    Adding nftables ipv4 rule for nfqws prerouting (qnum 200) : ct reply packets 1 tcp sport {80}
    Adding nftables ipv4 rule for nfqws postrouting (qnum 200) : tcp dport {443} ct original packets 1-6 mark and 0x40000000 == 0
    Adding nftables ipv4 rule for nfqws prerouting (qnum 200) : tcp sport {443} ct reply packets 1
    Adding nftables ipv4 rule for nfqws postrouting (qnum 210) : udp dport {443} ct original packets 1-6 mark and 0x40000000 == 0

    config dosyam bu şekilde

    # this file is included from init scripts
    # change values here

    # can help in case /tmp has not enough space
    #TMPDIR=/opt/zapret/tmp

    # redefine user for zapret daemons. required on Keenetic
    #WS_USER=nobody

    # override firewall type : iptables,nftables,ipfw
    FWTYPE=nftables

    # options for ipsets
    # maximum number of elements in sets. also used for nft sets
    SET_MAXELEM=522288
    # too low hashsize can cause memory allocation errors on low RAM systems , even if RAM is enough
    # too large hashsize will waste lots of RAM
    IPSET_OPT=”hashsize 262144 maxelem $SET_MAXELEM”
    # dynamically generate additional ip. $1 = ipset/nfset/table name
    #IPSET_HOOK=”/etc/zapret.ipset.hook”

    # options for ip2net. “-4” or “-6″ auto added by ipset create script
    IP2NET_OPT4=”–prefix-length=22-30 –v4-threshold=3/4″
    IP2NET_OPT6=”–prefix-length=56-64 –v6-threshold=5″
    # options for auto hostlist
    AUTOHOSTLIST_RETRANS_THRESHOLD=3
    AUTOHOSTLIST_FAIL_THRESHOLD=3
    AUTOHOSTLIST_FAIL_TIME=60
    # 1 = debug autohostlist positives to ipset/zapret-hosts-auto-debug.log
    AUTOHOSTLIST_DEBUGLOG=0

    # number of parallel threads for domain list resolves
    MDIG_THREADS=30

    # ipset/*.sh can compress large lists
    GZIP_LISTS=1
    # command to reload ip/host lists after update
    # comment or leave empty for auto backend selection : ipset or ipfw if present
    # on BSD systems with PF no auto reloading happens. you must provide your own command
    # set to “-” to disable reload
    #LISTS_RELOAD=”pfctl -f /etc/pf.conf”

    # override ports
    #HTTP_PORTS=80-81,85
    #HTTPS_PORTS=443,500-501
    #QUIC_PORTS=443,444

    # CHOOSE OPERATION MODE
    # MODE : nfqws,tpws,tpws-socks,filter,custom
    # nfqws : nfqws for dpi desync
    # tpws : tpws transparent mode
    # tpws-socks : tpws socks mode
    # filter : no daemon, just create ipset or download hostlist
    # custom : custom mode. should modify custom init script and add your own code
    MODE=nfqws
    # apply fooling to http
    MODE_HTTP=1
    # for nfqws only. support http keep alives. enable only if DPI checks for http request in any outgoing packet
    MODE_HTTP_KEEPALIVE=1
    # apply fooling to https
    MODE_HTTPS=1
    # apply fooling to quic
    MODE_QUIC=1
    # none,ipset,hostlist,autohostlist
    MODE_FILTER=none

    # CHOOSE NFQWS DAEMON OPTIONS for DPI desync mode. run “nfq/nfqws –help” for option list
    # SUFFIX VARS define additional lower priority desync profile. it’s required if MODE_FILTER=hostlist and strategy has hostlist-incompatible 0-phase desync methods (syndata,wssize)
    DESYNC_MARK=0x40000000
    DESYNC_MARK_POSTNAT=0x20000000
    NFQWS_OPT_DESYNC=”–dpi-desync=fake –dpi-desync-ttl=9″
    #NFQWS_OPT_DESYNC_SUFFIX=
    NFQWS_OPT_DESYNC_HTTP=”–dpi-desync=fake –dpi-desync-ttl=9″
    #NFQWS_OPT_DESYNC_HTTP_SUFFIX=
    NFQWS_OPT_DESYNC_HTTPS=”–dpi-desync=fake –dpi-desync-ttl=9″
    #NFQWS_OPT_DESYNC_HTTPS_SUFFIX=
    #NFQWS_OPT_DESYNC_HTTP6=
    #NFQWS_OPT_DESYNC_HTTP6_SUFFIX=
    #NFQWS_OPT_DESYNC_HTTPS6=
    #NFQWS_OPT_DESYNC_HTTPS6_SUFFIX=
    NFQWS_OPT_DESYNC_QUIC=”–dpi-desync=fake –dpi-desync-ttl=9″
    #NFQWS_OPT_DESYNC_QUIC_SUFFIX=
    #NFQWS_OPT_DESYNC_QUIC6=
    #NFQWS_OPT_DESYNC_QUIC6_SUFFIX=

    # CHOOSE TPWS DAEMON OPTIONS. run “tpws/tpws –help” for option list
    # SUFFIX VARS define additional lower priority desync profile. it’s required if MODE_FILTER=hostlist and strategy has hostlist-incompatible 0-phase desync methods (mss)
    TPWS_OPT=”–hostspell=HOST –split-http-req=method –split-pos=3 –oob”
    #TPWS_OPT_SUFFIX=”–mss 88″

    # openwrt only : donttouch,none,software,hardware
    FLOWOFFLOAD=donttouch

    # openwrt: specify networks to be treated as LAN. default is “lan”
    OPENWRT_LAN=”lan lan2 lan3″
    # openwrt: specify networks to be treated as WAN. default wans are interfaces with default route
    #OPENWRT_WAN4=”wan vpn”
    #OPENWRT_WAN6=”wan6 vpn6″

    # for routers based on desktop linux and macos. has no effect in openwrt.
    # CHOOSE LAN and optinally WAN/WAN6 NETWORK INTERFACES
    # or leave them commented if its not router
    # it’s possible to specify multiple interfaces like this : IFACE_LAN=”eth0 eth1 eth2″
    # if IFACE_WAN6 is not defined it take the value of IFACE_WAN
    #IFACE_LAN=eth0
    #IFACE_WAN=eth1
    #IFACE_WAN6=”ipsec0 wireguard0 he_net”

    # should start/stop command of init scripts apply firewall rules ?
    # not applicable to openwrt with firewall3+iptables
    INIT_APPLY_FW=1
    # firewall apply hooks
    #INIT_FW_PRE_UP_HOOK=”/etc/firewall.zapret.hook.pre_up”
    #INIT_FW_POST_UP_HOOK=”/etc/firewall.zapret.hook.post_up”
    #INIT_FW_PRE_DOWN_HOOK=”/etc/firewall.zapret.hook.pre_down”
    #INIT_FW_POST_DOWN_HOOK=”/etc/firewall.zapret.hook.post_down”

    # do not work with ipv4
    #DISABLE_IPV4=1
    # do not work with ipv6
    DISABLE_IPV6=1

    # select which init script will be used to get ip or host list
    # possible values : get_user.sh get_antizapret.sh get_combined.sh get_reestr.sh get_hostlist.sh
    # comment if not required
    #GETLIST=

    Yanıtla
    • Conf ve servise baktığımda bir sorun görünmüyor. Ancak ISP’nizin kullandığı engelleme methoduna uygun olmayabilir.
      Yayınladığım videoya göre kurulum dener misiniz?
      Bu yeni method parametreleri otomatik olarak bulmanızı sağlıyor.

      Yanıtla
  18. “–dpi-desync=fake –dpi-desync-ttl=2” superonline da işe yaramıyor hocam. GoodbyDPI çok iyi çalışıyor ama bu program arkada ne yapıyor. Neleri değiştiriyor bunu bulabilirsek zapret e de onları uygulamak istiyorum. Bunun için yardımcı olmanız mümkün mü?

    Yanıtla
  19. Sayfaya yerleştirdiğiniz bok gibi reklamlar yüzünden okuma zevkimin içine sıçtınız. Bunu yayınlamayacaksınız ama nasılsa göreceksiniz.

    3 kuruş para kazanacam diye sayfanın %80’i reklam olmaz. Domaininizi blackliste ekliyorum, kaza eseri de olsa ziyaret edip 3 kuruş para kazandırmayayım!

    Yanıtla

Yorum yapın