Created
December 21, 2025 06:31
-
-
Save maulvi/1abbf4d394ef4408ad9714b7664bd4e1 to your computer and use it in GitHub Desktop.
openwrt redirect 53 from lan and block 53 requests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| opkg install kmod-tcp-bbr luci-app-mwan3 ca-certificates curl nano stubby | |
| # Tambah redirect rule (klien → port 53 → dipaksa ke dnsmasq port 53) | |
| uci -q delete firewall.dns_redirect | |
| uci set firewall.dns_redirect='redirect' | |
| uci set firewall.dns_redirect.name='Force-DNS-to-Router' | |
| uci set firewall.dns_redirect.src='lan' | |
| uci set firewall.dns_redirect.src_dport='53' | |
| uci set firewall.dns_redirect.proto='tcp udp' | |
| uci set firewall.dns_redirect.dest='lan' | |
| uci set firewall.dns_redirect.dest_ip='192.168.69.1' # GANTI dengan IP LAN router kamu | |
| uci set firewall.dns_redirect.dest_port='53' | |
| uci set firewall.dns_redirect.target='DNAT' | |
| uci commit firewall | |
| /etc/init.d/firewall restart | |
| uci add firewall rule | |
| uci set firewall.@rule[-1].name='Block-DNS-WAN' | |
| uci set firewall.@rule[-1].src='lan' | |
| uci set firewall.@rule[-1].dest='wan' | |
| uci set firewall.@rule[-1].proto='tcp udp' | |
| uci set firewall.@rule[-1].dest_port='53' | |
| uci set firewall.@rule[-1].target='REJECT' | |
| uci commit firewall | |
| /etc/init.d/firewall restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment