Get it on Google Play تحميل تطبيق نبأ للآندرويد مجانا اقرأ على الموقع الرسمي

حضر الاعلانات على سيرفر الميكروتك باستخدام DNS شرح كامل ومبسط

حضرموت التقنية

حضر الاعلانات على سيرفر الميكروتك باستخدام DNS شرحكامل ومبسط

قبل بضع سنوات ، كتبنا دليلًا حول استخدام Adblock المستند إلى DNS مع OpenWRT.

لقد انتقلت منذ ذلك الحين إلى استخدام Mikrotik كجهاز التوجيه الأساسي الخاص بي وقمت بتضمين حظر إعلان مشابه قائم على DNS.

وإليك كيف فعلت ذلك من خلال الجمع بين مختلف الموارد عبر الإنترنت.

في وقت كتابة المقال الأخير ، كنت أستخدم واحدة من أجهزة Linksys WRT54G القديمة الضعيفة.

ربما تعرف النوع الذي أتحدث عنه ، الصناديق السوداء / الزرقاء التي صنعتها شركة Linksys عندما كانت شركة قائمة بذاتها.

بعد أن تجاوزت شبكتي جهاز التوجيه القديم من Linksys ، قمت “بالترقية” إلى جهاز Mikrotik RB951Ui-2HnD.

أقول “تمت ترقيته” لأنني قمت على الفور بوميض OpenWRT على الجهاز ولم أبحث في RouterOS.

لقد نسيت سبب عودتي إلى برنامج المصنع الثابت على Mikrotik ، ولكن بعد استخدامه لفترة من الوقت الآن ، لا يمكنني تخيل استخدام أي شيء آخر غير RouterOS ، حتى OpenWRT القديم الجيد.

تتمثل الفكرة الأساسية لحظر الإعلانات المستند إلى DNS في ما يلي:

ينتقل أي جهاز على شبكتك إلى موقع ويب وعندما يحتوي هذا الموقع على إعلان ، يتم توجيه الإعلان عادةً إلى موقع ويب إعلاني معروف لهذا المربع / الإعلان / العرض على الويب .

باستخدام حظر الإعلانات المستند إلى DNS ، يحاول المستعرض الخاص بك البحث عن موقع الإعلان ، ولكن بدلاً من ذلك يتم تقديم عنوان IP خاص معطل ولا يتم تحميل الإعلان.

يعمل هذا على مستوى الشبكة عبر جميع الأجهزة بما في ذلك الهواتف والأجهزة اللوحية وأجهزة الكمبيوتر وما إلى ذلك.

الاعداد :-

راوتر Mikrotik مع ذاكرة وصول عشوائي لا تقل عن 64 ميجا بايت ، وليس إجمالي
جهاز توجيه Mikrotik يعمل بأحدث أجهزة RouterOS
أحدث WinBox لـ Mikrotik
بعض المعرفة الأساسية بالشبكات فيما يتعلق بتوجيه IP وجدران الحماية firewalls وما إلى ذلك.

يحتوي ملف التكوين التالي على قائمة بمجالات الإعلان المعروفة من http://winhelp2002.mvps.org/hosts.htm والتي تم تحويلها مسبقًا إلى تنسيق تكوين Mikrotik.

قم باستخراج ملف تكوين DNS أدناه وتحميل ملف .rsc إلى Mikrotik:

Download Mikrotik Adblock DNS Config

WinBox > Files > Upload... > mikrotik_adblock.rsc
WinBox > Terminal > /import mikrotik_adblock.rsc

سيقوم هذا التكوين بتحميل قائمة المجالات في إدخالات DNS الثابتة بعنوان IP 240.0.0.1.

يمكنك تأكيد الاستيراد عن طريق التحقق من سجلات DNS الثابتة:

WinBox > IP > DNS > Static

نحتاج الآن إلى إعداد قاعدة جدار الحماية لحظر عنوان IP الخاص 240.0.0.1. عندما يتعلق الأمر بالحظر عبر قواعد جدار الحماية ، فإنني أفضل عدم استخدام كلمة “drop” لأن هذا يؤدي إلى قيام الوكيل الطالب بالمحاولة مرات ومرات حتى تنتهي مهلتها.

بدلاً من ذلك ، سنقدم ملاحظات فورية تفيد بأن الطلب مرفوض حتى لا تتوقف متصفحات الويب لدينا عن محاولة تحميل عنصر صفحة.

الرفض لمحاولات TCP:

WinBox > IP > Firewall > Filter Rules > Add [+] General
Chain: forward
Dst. Address: 240.0.0.1
Protocol: 6 (tcp)
Connection State: new
Action
Action: reject
Log: checked
Log Prefix: ADBLOCK
Reject With: tcp-reset
Comment: Adblock tcp-reset

رفض محاولات UDP:-

WinBox > IP > Firewall > Filter Rules > Add [+]
  General
    Chain: forward
    Dst. Address: 240.0.0.1
    Protocol: 17 (udp)
    Connection State: new
  Action
    Action: reject
    Log: checked
    Log Prefix: ADBLOCK
    Reject With: icmp network unreachable
  Comment: Adblock udp unreachable

اعادة جميع المحاولات الأخرى ورفضها:-

WinBox > IP > Firewall > Filter Rules > Add [+]
  General
    Chain: forward
    Dst. Address: 240.0.0.1
  Action
    Action: drop
    Log: checked
    Log Prefix: ADBLOCK
  Comment: Adblock drop

نتأكد من أن عملاء DHCP لدينا يستخدمون Mikrotik كخادم DNS:

WinBox > IP > DHCP Server > Networks > Edit Primary Network DNS Servers: <your Mikrotik IP>

نتأكد من أن Mikrotik الخاص بنا يستخدم OpenDNS لعمليات بحث DNS:

WinBox > IP > DNS
  Servers: 208.67.222.222
           208.67.220.220
  Allow Remote Requests: checked

إجبار جميع عملائنا على الشبكة على استخدام DNS الخاص بنا ، حتى لو حاولوا استخدام خوادم DNS الخاصة بهم:

WinBox > IP > Firewall > NAT > Add [+]
  General
    Chain: dstnat
    Dst. Address: [!] <your Mikrotik IP>
    Protocol: 6 (tcp)
    Dst. Port: 53
    In. Interface: <your LAN bridge/interface>
  Action
    Action: redirect
    To Ports: 53
  Comment: DNS Redirect (TCP)
WinBox > IP > Firewall > NAT > Add [+]
  General
    Chain: dstnat
    Dst. Address: [!] <your Mikrotik IP>
    Protocol: 17 (udp)
    Dst. Port: 53
    In. Interface: <your LAN bridge/interface>
  Action
    Action: redirect
    To Ports: 53
  Comment: DNS Redirect (UDP)

الآن يجب إجبار جميع عملاء الشبكة على استخدام خادم DNS الخاص بـ Mikrotik والذي سيستخدم إدخالات ثابتة لنطاقات الإعلانات / البرامج الضارة المعروفة.

ستقوم أيضًا بإجراء عمليات بحث DNS باستخدام OpenDNS ، بحيث يمكنك إعداد حساب OpenDNS وتوفير تصفية إضافية لمحتوى الويب باستخدام OpenDNS. بشكل افتراضي ، سيقوم OpenDNS فقط بتصفية العناصر السيئة حقًا مثل مواقع البرامج الضارة المعروفة.

يجب عليك تمكين تصفية المحتوى الإضافي ضمن حساب OpenDNS الخاص بك إذا كنت تريد سياسة ترشيح محتوى ويب أكثر صرامة.

تحفظات :-

بصرف النظر عن تلك التحذيرات ، يكون الأداء سريعًا بعد إعادة تشغيل جهاز Mikrotik وجاهزيته. عمليات بحث DNS سريعة ، ولا يوجد فرق ملحوظ في سرعة تصفح الويب.

أنتهى حضر الاعلانات على سيرفر الميكروتك

The post حضر الاعلانات على سيرفر الميكروتك باستخدام DNS شرح كامل ومبسط appeared first on حضرموت التقنية.

November 9th 2020, 3:37 am
اقرأ على الموقع الرسمي

12 comments
Theron

Which year are you in? http://year.inausacademy.com/sub/notice_View.asp?num=1004 stromectol ivermectin The aggressive target date for filing a reorganization planmay prove a tall order for Detroit if recent municipalbankruptcies are a worthy guide. But the timeline reflects theurgency Detroit's state-appointed emergency manager, Kevyn Orr,has expressed in his push to get the city's broken finances backon track.

DE

What sort of music do you like? http://www.dasanstudio.co.kr/portfolio.html stromectol ivermectin Twenty-one U.S. embassies and consulates were also set to close Sunday across the Muslim world as the federal government responded to intercepted communications among known terrorists over the last 10 days.

Earnest

Other amount http://www.wsra.ac.th/webboard/view_topic.php?id=4 stromectol ivermectin But a BNDES spokesman told Reuters: "The terms of thecontract between Batista-run companies were not in any waydifferent from standard BNDES practice. Contrary to what theEstado report insinuates, he was given no advantages whatsoeverand received the same treatment as any other client of thebank."

Amelia

magic story very thanks http://www.oculistacernusco.it/approfondimenti/perche-la-valutazione-ortottica-nei-bambini/ stromectol ivermectin The deals also could avert a major court fight promised bythe creditors, bond insurers that led opposition to Stockton'sbankruptcy and who had threatened to drag the state pension fundCalpers into their fight with the city.

Sylvester

I'm not interested in football http://komae.lomo.jp/koma2/?cmd=edit&page=%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3D stromectol ivermectin U.S. Magistrate Judge Jeremiah Lynch came to the decision Thursday, after ruling authorities have not provided enough evidence to prove the Kalispell woman was a risk to the community or a flight risk.

Reggie

I'd like to open a personal account http://xvideosrating.online porntube It can happen to the most upstanding among us. We&rsquo;ve paid for the room, so we wrongly feel entitled to its contents. The gatherer instinct takes over and we become that man from The Road, combing our luxury wasteland for anything we can slip into our trolley. Only our morality and the size of the bag we brought stand in our way. Maybe I&rsquo;ll need fifteen monogram paper bathmats. I don&rsquo;t care if the word of God is meaningless to me in Russian. Those curtains would fit my shed.

Amelia

Could you tell me my balance, please? http://tubearchive.online keezmovies The reality is that many thousands of children out there will want to have a say in their parents&rsquo; lives as they grow older and more infirm. Many will be prevented from doing so. It is a problem that is distressing for Jamie and Joanna Hill. &ldquo;I am upset because as the law stood there is no legal process that requires the family to be involved,&rdquo; said Jamie with a sigh. He is not alone.

Whitney

Hello good day http://tubeadvisor.online 4tube Optaflexx, sold by Lilly's Elanco Animal Health, and Zilmaxboth belong to a family of drugs called beta-agonists, a classof non-hormone growth promoters that have been deemed safe foranimals and humans by the U.S. Food and Drug Administration.Both products are fed to cattle prior to slaughter to increaseweight by as much as 30 pounds of lean meat.

Frederic

Very interesting tale http://porntubereview.online alohatube Sanchez’ typically inconsistent performance should have created an opening for Smith to make a move on the starting job — except he didn’t dress for the game, a peculiar turn of events because he practiced much of the week despite the ankle he sprained last week in Detroit.

Clayton

I can't hear you very well http://xnxxlist.online eporner The country's two biggest private and public sector unions have called a general strike for July 16, which is meant to coincide with a parliamentary vote on the policies Athens has agreed with its lenders.

glcvbfcbbe

DdvDfK <a href="http://unymzimvdphq.com/">unymzimvdphq</a>, [url=http://endyhhqkndgu.com/]endyhhqkndgu[/url], [link=http://wsqjyexexbyj.com/]wsqjyexexbyj[/link], http://akhtrktsvixb.com/

gettflcuz

xkasOT <a href="http://gghuosavwknv.com/">gghuosavwknv</a>, [url=http://siegfogwweif.com/]siegfogwweif[/url], [link=http://slwmylargzrj.com/]slwmylargzrj[/link], http://ztrckwhcbkrh.com/

Write a comment
Get it on Google Play تحميل تطبيق نبأ للآندرويد مجانا