0

I just followed the tutorial here for creating a bridged wireless access point with my Raspberry Pi 4. Now what I'm trying to do is ensure that any device connected to the Pi's network gets specific DNS records. For example, example.com could re-route to the Pi's local IP address 192.168.1.2 (sort of like a captive portal, but for specific websites).

What I already tried:

I've already installed Dnsmasq on the Pi, so when I use dig example.com it returns 192.168.1.2. However, this only works from the Pi's perspective, and if I connect to its network from another device and run dig example.com, it returns the real IP address.

How can I make DNS queries from devices connected to the Pi's network follow its DNS records? I'd prefer not to configure the WiFi network settings to specifically point to the Pi as a DNS server, but when I tried, even that didn't work.

2
  • If you want to intercept traffic DON'T create a bridge.
    – Milliways
    Sep 7 at 1:44
  • Configure the DHCP server to point the WiFi devices to your Pi as DNS server.
    – Bodo
    Sep 7 at 9:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.