Community discussions

MikroTik App
 
matrix554
just joined
Topic Author
Posts: 4
Joined: Mon Oct 23, 2017 3:49 pm

Forward one host to different DNS address

Mon Oct 23, 2017 4:15 pm

Good morning guys.
I'm new on forum.

Here, we use Opendns to block some webpages, f.i. social networking, 18+, etc.
My company bought a Rb 951g-2hnd and I need configure the dns from domain controller and forward to Opendns.

My question is: The manager needs open any website, then I need forward only one host to another dns.
Is possible?

I was reading about this and I see that is possible capture dns packets and forward, but is possible do this only to one host?
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: Forward one host to different DNS address

Mon Oct 23, 2017 9:51 pm

Make sure the client pc have static IP and add this to the rule under source address
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Forward one host to different DNS address

Mon Oct 23, 2017 10:33 pm

Here, we use Opendns to block some webpages, f.i. social networking, 18+, etc.
My company bought a Rb 951g-2hnd and I need configure the dns from domain controller and forward to Opendns.

My question is: The manager needs open any website, then I need forward only one host to another dns.
Make sure you mount a big red lamp above the manager's office door which will be blinking whenever he
access sites that are blocked for everyone else!
 
matrix554
just joined
Topic Author
Posts: 4
Joined: Mon Oct 23, 2017 3:49 pm

Re: Forward one host to different DNS address

Mon Oct 23, 2017 10:42 pm

Make sure the client pc have static IP and add this to the rule under source address
The PC have static IP 192.168.88.10, and I want that it uses the DNS 8.8.8.8

Then I need to do this?:
/ip firewall nat
add chain=dstnat action=dst-nat src-addresses=192.168.88.10 to-addresses=8.8.8.8 to-ports=53 protocol=tcp dst-port=53
add chain=dstnat action=dst-nat src-addresses=192.168.88.10 to-addresses=8.8.8.8 to-ports=53 protocol=udp dst-port=53
Make sure you mount a big red lamp above the manager's office door which will be blinking whenever he
access sites that are blocked for everyone else!
LOL
 
User avatar
lbachero
newbie
Posts: 38
Joined: Wed Oct 08, 2014 4:39 pm
Location: Dublin
Contact:

Re: Forward one host to different DNS address

Mon Oct 23, 2017 11:01 pm

Just remember:
Someone can configure DNS manual on its machine.

So, you can do this:
/ip firewall nat add chain=dstnat src-address=!192.168.88.10 protocol=udp dst-port=53 action=redirect to-ports=53
 
matrix554
just joined
Topic Author
Posts: 4
Joined: Mon Oct 23, 2017 3:49 pm

Re: Forward one host to different DNS address

Tue Oct 24, 2017 6:59 pm

Just remember:
Someone can configure DNS manual on its machine.

So, you can do this:
/ip firewall nat add chain=dstnat src-address=!192.168.88.10 protocol=udp dst-port=53 action=redirect to-ports=53
I need to do this to tcp too?

This code catch all dns packets e redirect to dns that is configured in DHCP on Mikrotik?
 
User avatar
lbachero
newbie
Posts: 38
Joined: Wed Oct 08, 2014 4:39 pm
Location: Dublin
Contact:

Re: Forward one host to different DNS address

Tue Oct 24, 2017 9:08 pm

I need to do this to tcp too?
No, only in UDP (Recursive).
This code catch all dns packets e redirect to dns that is configured in DHCP on Mikrotik?
Yes, it will catch every DNS request and redirect to RB.
 
matrix554
just joined
Topic Author
Posts: 4
Joined: Mon Oct 23, 2017 3:49 pm

Re: Forward one host to different DNS address

Tue Oct 24, 2017 9:19 pm

I need to do this to tcp too?
No, only in UDP (Recursive).
This code catch all dns packets e redirect to dns that is configured in DHCP on Mikrotik?
Yes, it will catch every DNS request and redirect to RB.
OK. Thank you very much.

Who is online

Users browsing this forum: KozmoNaut, Stevenbull88 and 33 guests