Community discussions

MikroTik App
 
lanhampr
newbie
Topic Author
Posts: 34
Joined: Wed Aug 04, 2021 7:18 pm

Return same IP for all DNS queries.

Wed Jan 18, 2023 7:11 pm

Can the Mikrotik DNS server be set in a way to return same IP for all DNS queries?
 
User avatar
k6ccc
Forum Guru
Forum Guru
Posts: 1490
Joined: Fri May 13, 2016 12:01 am
Location: Glendora, CA, USA (near Los Angeles)
Contact:

Re: Return same IP for all DNS queries.

Wed Jan 18, 2023 8:03 pm

Why on earth would you want to do that?
What's your use case.
 
lanhampr
newbie
Topic Author
Posts: 34
Joined: Wed Aug 04, 2021 7:18 pm

Re: Return same IP for all DNS queries.

Wed Jan 18, 2023 8:10 pm

My objective to route all traffic to a website for given network. (Deliquent users) I have looked at the Proxy solution but found that you cannot redirect HTTPS traffic, so I thought what about a DNS solution, return a single IP (our website) for all queries ≈ for given network. Would this method work, I don't know, just trying ideas.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19100
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Return same IP for all DNS queries.

Wed Jan 18, 2023 9:14 pm

Possible but takes a special skill set to do this work..
 
reinerotto
Long time Member
Long time Member
Posts: 520
Joined: Thu Dec 04, 2008 2:35 am

Re: Return same IP for all DNS queries.

Thu Jan 19, 2023 9:02 am

#In case, your mikrotikdevice is officially supported by openwrt,
#flash openwrt to your mikrotik, log into the router, i.e. via ssh or putty, and then it is just a one-liner:

echo 'address=/#/ONLYIP' >> /etc/dnsmasq.conf
#i.e. echo 'address=/#/192.168.1.1' >> /etc/dnsmasq.conf
#reboot

#This will force all domains, resolved by dnsmasq, the well known, and well documented tiny
#DNS-resolver/dhcp-server to ONLYIP.

Thank you for another real-world comparison of ROS and openwrt functionality.
 
User avatar
Znevna
Forum Guru
Forum Guru
Posts: 1347
Joined: Mon Sep 23, 2019 1:04 pm

Re: Return same IP for all DNS queries.

Thu Jan 19, 2023 9:22 am

Thank you for another real-world comparison of ROS and openwrt functionality.
Welcome.
/ip dns static
add address=10.10.9.1 disabled=no regexp=.* ttl=1d
add address=::1 disabled=no regexp=.* ttl=1d type=AAAA
 
lanhampr
newbie
Topic Author
Posts: 34
Joined: Wed Aug 04, 2021 7:18 pm

Re: Return same IP for all DNS queries.

Thu Jan 19, 2023 4:26 pm

What are you quotiing whole preceding post for? Does it help answering? Use "Post Reply" button. When you talk to somone do you repeat what was said before answering?
This works, thanks, but it won't display web pages with out getting a security error since the majority of pages have certs. Maybe the Hotspot can be used to capture delinquent users.
Last edited by BartoszP on Thu Jan 19, 2023 11:26 pm, edited 1 time in total.
Reason: removed excessive quotting of preceding post; be wise, quote smart, save network traffic
 
User avatar
Znevna
Forum Guru
Forum Guru
Posts: 1347
Joined: Mon Sep 23, 2019 1:04 pm

Re: Return same IP for all DNS queries.

Thu Jan 19, 2023 5:25 pm

This isn't a proper solution, because we are in 2023.
I was just pointing out that you can also do this in RouterOS, not just with dnsmasq as our lovely user above posted.
 
lanhampr
newbie
Topic Author
Posts: 34
Joined: Wed Aug 04, 2021 7:18 pm

Re: Return same IP for all DNS queries.

Thu Jan 19, 2023 9:30 pm

What are you quotiing whole preceding post for? Does it help answering? Use "Post Reply" button. When you talk to somone do you repeat what was said before answering?
I agree, just trying different ideas. We want to give a subnet to users that only get access to our customer portal.
Last edited by BartoszP on Thu Jan 19, 2023 11:26 pm, edited 1 time in total.
Reason: removed excessive quotting of preceding post; be wise, quote smart, save network traffic

Who is online

Users browsing this forum: anav, Bing [Bot], dervomsee and 91 guests