How to forward your LAN to PiHole

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ต.ค. 2024

ความคิดเห็น • 96

  • @JemiToShumafuk
    @JemiToShumafuk ปีที่แล้ว +21

    1:48 - "This is not the DNS you are looking for." Nice one=D

  • @Killgrind
    @Killgrind 9 หลายเดือนก่อน

    I'm super grateful for this, nat rules are intimidating

  • @FinlayDaG33k
    @FinlayDaG33k ปีที่แล้ว

    I've used a similar rule a few weeks ago when I installed AdGuard here and had to transition from using the router as the local DNS server to said AdGuard server.
    Works like a charm.

  • @valentinegraev9350
    @valentinegraev9350 ปีที่แล้ว +1

    thanks for video. please tell me, do you have plan b ? for example ,if pihole down , hosts can't resolve. how i can do fault tolerance? maybe netwatch or some script? how i can do it correctly?

  • @pasvar
    @pasvar ปีที่แล้ว

    Nice! I enjoy learning more about networking and Mikrotik whit this short videos.

  • @ltpinecone
    @ltpinecone 3 หลายเดือนก่อน

    You guys are legends for making this video.

    • @mikrotik
      @mikrotik  3 หลายเดือนก่อน

      You are a legend for watching it! :)

  • @Anavllama
    @Anavllama ปีที่แล้ว +3

    You are missing one component to ensure success. Clue........ the server and users are on the same subnet.................... hairpin!
    Require a source nat rule, add chain=srcnat action=masquerade src-address=192.168.88.0/24 dst-address=192.168.88.0/24.
    Further in dhcp -server network I would not change the dns server to the pihole ( for the server subnet ), as that is also sending requests to oneself, but a good plan for all other subnets if any. Your destination nat rules will ensure users requests go to PiHOLE and the exception used prevents pihole from tripping over itself again.

  • @TechdoLiberal
    @TechdoLiberal ปีที่แล้ว +2

    "This is not the DNS you are looking for"....
    hahaha... Nice!

  • @mjsun42
    @mjsun42 ปีที่แล้ว +1

    In first method, what if I give 2 DNS server address, say, 192.168.88.3 , 192.168.88.1, will the LAN device (dhcp client) use both randomly , or always use the 88.3 frist and if fails, fall back to 88.1 ?

    • @WrakoLife
      @WrakoLife ปีที่แล้ว

      No, it's random as far as I know.

    • @Perokoulos
      @Perokoulos ปีที่แล้ว

      I've done that. I'm running pihole in a container in the router itself. As far I can see the clients use the 192.168.88.3 as default and the 192.168.88.1 only if pihole is down. The problem is that when pihole comes online the clients continue to use 192.168.88.1, I'll figure how to fix this one day... 😂

  • @Nitrag0191
    @Nitrag0191 ปีที่แล้ว

    Wait, why not IP>DNS the set PiHole IP to server list. Add Netwatch rule to change to 1.1.1.1 if PiHole is unreachable?

  • @MustaMT
    @MustaMT ปีที่แล้ว

    Any plans for multi-gig poe switches now that some access points have 2.5G uplinks? :')

  • @vdias1569
    @vdias1569 ปีที่แล้ว

    Good idea, but missing two really important details...
    1) What happens if the devices have hardcode DoT or DoH DNS settings... how do you control this?
    2) What happens when your "pi-hole" dns is down for maintenance or failure?

    • @mikrotik
      @mikrotik  ปีที่แล้ว +1

      1) you can't control that, except block known DoH servers by IP
      2) since your router controls which DNS server your LAN is using, you can make a failover setup. if pihole down, use router as DNS server

    • @4L3xN3t
      @4L3xN3t ปีที่แล้ว

      @@mikrotik could you please help somehow configuring the failover setup in case pihole is down?

  • @NoName-z5k8h
    @NoName-z5k8h ปีที่แล้ว +3

    Without setting up the masquerade, the method via nat does not work. It does not return the dns server request to the client

    • @mikrotik
      @mikrotik  ปีที่แล้ว

      The video assumes your network is already configured correctly

    • @Problembaer4
      @Problembaer4 ปีที่แล้ว

      Thats true, if the client and the pihole are in the same lan-segment, the pihole will send the answer directly to the client (without going via the router). In that case it wont work. Example: client will connect to 8.8.8.8 the router DNATs to the pihole. The answer is from 192.168.88.3 not from 8.8.8.8 which makes the answer invalid for the client. You need(!!) a SNAT rule (assuming the client and the pi are in the same l2 segment).

    • @NoName-z5k8h
      @NoName-z5k8h ปีที่แล้ว

      @@mikrotik is there any article showing step by step how to configure the option to intercept dns requests through nat?

    • @mikrotik
      @mikrotik  ปีที่แล้ว

      I don't understand your question. This video is what you are asking.

    • @NoName-z5k8h
      @NoName-z5k8h ปีที่แล้ว

      @@mikrotik Thanks in advance for your reply

  • @willyelvis9369
    @willyelvis9369 ปีที่แล้ว +2

    Easy, thx for shared ❤

  • @josecalzadilla1146
    @josecalzadilla1146 ปีที่แล้ว

    Greetings. I have a system working under PPPoE and not DHCP. How could I configure in this case?. Thank you!

    • @mikrotik
      @mikrotik  ปีที่แล้ว +1

      Even PPPoE clients get their IP address from DHCP server. The settings are the same. Check which DHCP pool is specified in your PPPoE access concentrator settings, and set the appropriate DHCP network DNS setting to the PiHole IP address.

    • @josecalzadilla1146
      @josecalzadilla1146 ปีที่แล้ว

      @@mikrotik Grateful for the information. Keeping in line with the idea that I want to capture, the IP addresses of the users are supplied by the PPPoE server and through their username and password, they take the pre-established (Static) IP address. I do not know if you understand me.

  • @ukhaizid4480
    @ukhaizid4480 ปีที่แล้ว

    what if I use this method, but the hotspot user cannot display the login page?

  • @sohaiblodhi
    @sohaiblodhi ปีที่แล้ว

    How to integrate mikrotik with Active directory? Is there any docker container for that or else

    • @mikrotik
      @mikrotik  ปีที่แล้ว

      What would you like to integrate? RouterOS users?

    • @sohaiblodhi
      @sohaiblodhi ปีที่แล้ว

      @@mikrotik active directory users with RouterOS

    • @mikrotik
      @mikrotik  ปีที่แล้ว

      RouterOS supports user authentication against RADIUS. If you provide "domain" option in the menu "/radius client", Active Directory could also work. You can also ask this question in our forum, maybe somebody has a more complete setup forum.mikrotik.com

  • @JemiToShumafuk
    @JemiToShumafuk ปีที่แล้ว

    What is difference between your suggested settings (ip/ DHCP Server/ Networks/ DNS server) and IP/ DNS Settings/ Servers? Or even DNS static? There is too much options!

    • @mikrotik
      @mikrotik  ปีที่แล้ว +1

      Like described in the video, first method works if all devices use dhcp. Second method needed if your lan users are not under your control and use their own dns settings, but you want to force them

    • @NoName-z5k8h
      @NoName-z5k8h ปีที่แล้ว

      @@mikrotik Without setting up the masquerade, the method via nat does not work. It does not return the dns server request to the client

    • @mikrotik
      @mikrotik  ปีที่แล้ว

      It works fine. Most likely you have other things in your setup that must be configured first

  • @Michael-Sasser
    @Michael-Sasser ปีที่แล้ว

    Is there any ETA on RouterOS 7.x LTS?

  • @erfangholizadeh
    @erfangholizadeh ปีที่แล้ว +3

    did anyone catch the glitch at 1:48 ? may the force be with you mikrotik

  • @Oberst3001
    @Oberst3001 14 วันที่ผ่านมา

    im interested in your plex configuration ) 1:56

  • @sagetechnology4913
    @sagetechnology4913 ปีที่แล้ว

    Can I use it to redirect every DNS request on my company's network to adult websites? (especially the company intranet sites).

    • @RB01-lite
      @RB01-lite ปีที่แล้ว

      I tried with static DNS to regex match all hostnames to the wrong IP, but the browser prevents opening the wrong site due to hostname mismatch with the TLS certificate. Perhaps Burp suite can do it.

    • @sagetechnology4913
      @sagetechnology4913 ปีที่แล้ว +2

      @@RB01-lite thx will direct all company traffic to the gay side of the hub.

  • @salembaabbad8783
    @salembaabbad8783 ปีที่แล้ว

    I had configer pihole container in v7.5 it worked well but i couldn't configer a load balance probably in the same rb

  • @luiso.rivera2100
    @luiso.rivera2100 ปีที่แล้ว

    What if I use specific dns server like opendns for my lan clients and want to keep them and just use pi hole for add removal?

    • @mikrotik
      @mikrotik  ปีที่แล้ว

      Use the instructions in this video, and then in your PiHole set to use opendns

  • @gegeqingqing
    @gegeqingqing ปีที่แล้ว +1

    all ips in pi-hole are routeros'ip ,how to show real ip in pi-hole with dns dst-nat

  • @dumanovschimariandimitrie7381
    @dumanovschimariandimitrie7381 ปีที่แล้ว +2

    It's working fine, but the problem is that I can see only 1 client in the top client list, that is the pihole's docker internal ip itself (172.x.x.x range). The pi hole in itself is functioning correctly, tested with 2 different hosts, by manually adding Windows 10 host IP, as DNS server, DNS queries are getting resolved, ads are getting blocked but, there's only 1 IP showing no matter ho many hosts are there. I want to have the segregation on a per-host basis.

    • @jbrewerii
      @jbrewerii ปีที่แล้ว +1

      Change the pi-hole to an IP Address outside the range of your network and setup a route for the pi-hole. You can then omit the NAT and the pi-hole will see individual devices.

    • @dumanovschimariandimitrie7381
      @dumanovschimariandimitrie7381 ปีที่แล้ว

      @@jbrewerii PiHole IP(10.0.1.2) is outside of my network range(192.168.1.0/24). What NAT rules i need to see all client ips?

    • @gennsk
      @gennsk ปีที่แล้ว

      this happens when all the dns requests are being forwarded to pihole, so pi hole sees all dns requests from the router. what i did was add the pi hole to dhcp server, and a dst-nat rule to forward traffic not already going to the pi hole. in other words, forward dns that came from a rogue client that does not want to use the pihole. in this scenario only those clients will be marked from the router

    • @RobertoGaxiola
      @RobertoGaxiola ปีที่แล้ว

      i use these rules to catch te real ip address from all my devices, well its not the "real ip" because it changes the 1st octet (192 to 10), this wotks also for my hairpin nat
      /ip firewall mangle
      add action=accept chain=prerouting comment=HairPin dst-address=10.168.0.0/24
      /ip firewall nat
      add action=netmap chain=srcnat comment="Hairpin NAT masquerade" \
      to-addresses=10.168.0.0/24
      add action=dst-nat chain=dstnat comment="Pi-Hole rule 1" dst-address=!192.168.0.8 \
      dst-port=53 in-interface=bridge protocol=udp src-address=!192.168.0.8 \
      to-addresses=192.168.0.8
      add action=dst-nat chain=dstnat comment="Pi-Hole rule 2" dst-address=!192.168.0.8 \
      dst-port=53 in-interface=bridge protocol=tcp src-address=!192.168.0.8 \
      to-addresses=192.168.0.8
      add action=masquerade chain=srcnat comment="Pi-Hole rule 3" dst-address=\
      192.168.0.8 dst-port=53 protocol=udp
      add action=masquerade chain=srcnat comment="Pi-Hole rule 4" dst-address=\
      192.168.0.8 dst-port=53 protocol=tcp

  • @JemiToShumafuk
    @JemiToShumafuk ปีที่แล้ว

    Is it possible to us this settings if using pihole with unbound?

    • @RockFordCademce
      @RockFordCademce ปีที่แล้ว

      no difference if you are running unbound on same host as pihole

  • @iRonMan-s7c
    @iRonMan-s7c ปีที่แล้ว

    How i can enter to Lan from Wan

  • @Ekz0rcyst
    @Ekz0rcyst ปีที่แล้ว

    Thanks for video again! How about settings in "IP-DNS-Servers:" if using this methods?
    Before watching this video I using IP my Pi-hole in "IP-DNS-Servers:" and works well good.

    • @Ekz0rcyst
      @Ekz0rcyst ปีที่แล้ว

      Update. I answer my own question - I used the DHCP method - works great! Thanks! Again.

    • @valentinegraev9350
      @valentinegraev9350 ปีที่แล้ว

      @@Ekz0rcyst скажи пожалуйста, ты как то отказоустоичивость делал? у меня в докере на одной из виртуалок стоит адгуард, если падает докер, у хостов нет резолва

    • @Ekz0rcyst
      @Ekz0rcyst ปีที่แล้ว

      ​@@valentinegraev9350 Питанням відмовостійкості, я не займався. Немає потреби.

  • @josecalzadilla1146
    @josecalzadilla1146 ปีที่แล้ว

    Saludos. Es necesario una Raspberry Pi para esto?

    • @mikrotik
      @mikrotik  ปีที่แล้ว

      This is a MikroTik channel, we do not have instructions to use Raspberry Pi. This only teaches you the MikroTik part.

    • @josecalzadilla1146
      @josecalzadilla1146 ปีที่แล้ว

      I get It. But my question Is about if I should have an Raspberry Pi hardware to do this. Thanks!

    • @mikrotik
      @mikrotik  ปีที่แล้ว +1

      It is up to you, where you will install PiHole. It is your choice. docs.pi-hole.net/main/basic-install/

    • @josecalzadilla1146
      @josecalzadilla1146 ปีที่แล้ว

      @@mikrotik Thanks for all!

  • @tonymolina885
    @tonymolina885 9 หลายเดือนก่อน

    Niiiiice!

  • @dynabook303
    @dynabook303 ปีที่แล้ว +1

    Cant work client those using 8.8.8.8 or others public dns to force use pi hole.

  • @jabeztechs
    @jabeztechs ปีที่แล้ว

    Need help with my mikrotik cheateu LTE port going off and will not come back on even with reboot still same ,did log for it to see the error

    • @jabeztechs
      @jabeztechs ปีที่แล้ว

      LTE 1 no response for At E0 V1

    • @jabeztechs
      @jabeztechs ปีที่แล้ว

      No signal ,was working b4 but stop ,and use different sim will work for sometime and vanish

    • @mikrotik
      @mikrotik  ปีที่แล้ว +1

      make a post in forum.mikrotik.com to get some help

    • @jabeztechs
      @jabeztechs ปีที่แล้ว

      It will not allow me on the page

  • @piotrsulima8696
    @piotrsulima8696 ปีที่แล้ว

    @MikroTik thanks 👍

  • @robinsoori1783
    @robinsoori1783 ปีที่แล้ว

    then in ip dns, it need real dns server or not ?

    • @mikrotik
      @mikrotik  ปีที่แล้ว +1

      that menu is only for router itself. it does not matter what you have in "IP DNS" if you use the steps in this video

    • @robinsoori1783
      @robinsoori1783 ปีที่แล้ว

      @@mikrotik then what is the purpos of this step ?

  • @wreckedzilla
    @wreckedzilla ปีที่แล้ว +1

    your?

  • @jurajvantuch9636
    @jurajvantuch9636 ปีที่แล้ว

    Please, new video about new series of reliable buisness switches(24,48)...present for christmas :) :)

  • @AntonioPena1
    @AntonioPena1 ปีที่แล้ว

    You only need UDP, as queries only uses UDP.

    • @francocastilloAR
      @francocastilloAR ปีที่แล้ว +1

      I understand that DNS uses TCP and UDP.

  • @ChrisNicholson
    @ChrisNicholson ปีที่แล้ว +1

    Give me speedify in a container.

  • @wreckedzilla
    @wreckedzilla ปีที่แล้ว

    starwars, starwars, seaguls

  • @rikkardo91
    @rikkardo91 ปีที่แล้ว +2

    1:48 🤣

    • @stevenm45
      @stevenm45 ปีที่แล้ว

      It was subliminal messaging or advertising in that frame ;)

  • @alfinaaa
    @alfinaaa ปีที่แล้ว +5

    Lmao, just for 1frame to star wars. 🤣🤣🤣🤣🤣🤣🤣

  • @Michael-bt7bq
    @Michael-bt7bq ปีที่แล้ว

    Can you send me your sweater if you ever get rid of it. I'll pay for shipping.

  • @DaryllSwer
    @DaryllSwer ปีที่แล้ว

    Cover IPv6 as well when you do these videos.

  • @DeviloftheHelll
    @DeviloftheHelll ปีที่แล้ว

    now combine it in a tutorial, setting it up, redirecting and using its own recursive server with encrypted data transfer

    • @mikrotik
      @mikrotik  ปีที่แล้ว

      This is still a MikroTik channel though

    • @DeviloftheHelll
      @DeviloftheHelll ปีที่แล้ว +1

      @@mikrotik yes, i know. configured in router os

    • @mikrotik
      @mikrotik  ปีที่แล้ว

      PiHole is on a separate device.

    • @JemiToShumafuk
      @JemiToShumafuk ปีที่แล้ว

      I'm also struggle with that. I just cannot set up pihole with custom upstream via unbound or stubby. DoH is working only if directly setup in router (one of previous videos form MikroTik shows how to do it), but then pihole is not solving and filtering requests obviously.

    • @DeviloftheHelll
      @DeviloftheHelll ปีที่แล้ว

      @@mikrotik in this presentation. but since router os can run the pihole or other containers, do a tutorial please, with all the rules catches etc
      all of these contained within router os