• September 23, 2019, 03:15:37 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: Configure firewall for OpenDNS  (Read 3084 times)

Deleterious

  • Level 1 Member
  • *
  • Posts: 4
Configure firewall for OpenDNS
« on: January 30, 2016, 02:57:39 PM »

I've set my home network up to use OpenDNS content filtering.  This works fine until someone manually changes their DNS IP addresses on their machines.  I've read that there's a way to prevent this with firewall rules.

From here: https://support.opendns.com/entries/26374985-Preventing-circumvention-of-OpenDNS-with-firewall-rules

it says :

Essentially, add the following filter or rule to the firewall that is at the edge of the network:
 
ALLOW TCP/UDP IN/OUT to 208.67.222.222 or 208.67.220.220 on Port 53

and

BLOCK TCP/UDP IN/OUT all IP addresses on Port 53

I'm having challenges trying to execute this in the firewall rule interface on my 890L.  I can add 2 rules for the "Allow" portion - but can't seem to add the commensurate "Block" portion at the same time. 

Further, I can't seem to block "All (WAN) addresses on Port 53".

What am I missing?
Logged

FurryNutz

  • Poweruser
  •   ▲
    ▲ ▲
  • *****
  • Posts: 47763
  • D-Link Global Forum Moderator
    • Router Troubleshooting
Re: Configure firewall for OpenDNS
« Reply #1 on: January 30, 2016, 03:12:15 PM »

Link>Welcome!

  • What Hardware version is your router? Look at sticker under the router case.
  • Link>What Firmware version is currently loaded? Found on the routers web page under status.
  • What region are you located?

Internet Service Provider and Modem Configurations
  • What ISP Service do you have? Cable or DSL?
  • What ISP Modem Mfr. and model # do you have?

Are you using DNS Relay on the router and have the custom DNS IP addresses set into the router Internet section and using IP reservations?

I haven't tried your method so I don't know if it will work or not.

 
Logged
Cable:200mb/10Mb>NetGear C7800>DIR-882>DGS-1100>HP 24pt Gb Switch. COVR-3902/2202/1203,DIR-2680,890L,882,880L,868L,DNR-202L,DNS-345x2,DCS-933L,936L and 960L.
Go Here>Router Troubleshooting

Deleterious

  • Level 1 Member
  • *
  • Posts: 4
Re: Configure firewall for OpenDNS
« Reply #2 on: January 30, 2016, 04:39:41 PM »

It's hardware Version A running firmware 1.08 (latest)

I'm located in the US

I currently have Cable internet through CableOne.

My modem is a Motorola surfboard - I don't have the version at the moment.

I don't believe that I've set up a DNS Relay, I've set both the primary and secondary DNS entries to point to the OpenDNS servers.

I only have a few IP reservations - most are connecting through DHCP.

As I mentioned before, OpenDNS is working - I'm just having difficulty figuring out how to set up the firewall rules I wish.
Logged

Hard Harry

  • Guest
Re: Configure firewall for OpenDNS
« Reply #3 on: January 30, 2016, 05:11:21 PM »

If you have one rule to block ALL traffic on port 53, won't that conflict with allowing. I would suggest a whitelist "Turn IPv4 filtering On and Allow".

Name: DNS
Source IP Address Range(WAN): 208.67.220.220-208.67.220.222
Destination IP Address Range(LAN): What ever your networks IP sceme is, IE 192.168.0.1-192.168.0.100
Port Range(Any): 53
Always Enable
Apply.

This will block all outgoing DNS request on port 53 except those going to 208.67.220.220-208.67.220.222. This is not fool proof though. This would not block IPv6 DNS like Google's IPv6 DNS. Also, it may not apply if they set their PC to a static 172.x.x.x IP.
Logged

Deleterious

  • Level 1 Member
  • *
  • Posts: 4
Re: Configure firewall for OpenDNS
« Reply #4 on: January 30, 2016, 06:04:16 PM »

I tried that setting, but it completely stopped all network traffic for me.  Nothing would resolve, I couldn't ping, etc.

I'm imagining that "Turn on IPv4 filtering and ALLOW" is whitelisting - only traffic that meets the rules is allowed.  Why it blocked legitimate OpenDNS DNS requests I can't begin to guess.  I even switched the "Source" and "Destination" blocks to no avail.

If "ALLOW" is whitelisting, then "DENY" is blacklisting - but a rule that blocks out the whole internet for that port but that range seems.. dumb.

And why doesn't it seem that you use ALLOW and DENY at the same time? 

Logged

Hard Harry

  • Guest
Re: Configure firewall for OpenDNS
« Reply #5 on: January 30, 2016, 08:11:25 PM »

I tried that setting, but it completely stopped all network traffic for me.  Nothing would resolve, I couldn't ping, etc.
Could you ping by IP? If not, then it isn't a DNS issue. Also, did you have your PC set to static OpenDNS or just set it via the router's WAN settings?

I'm imagining that "Turn on IPv4 filtering and ALLOW" is whitelisting - only traffic that meets the rules is allowed.  Why it blocked legitimate OpenDNS DNS requests I can't begin to guess.  I even switched the "Source" and "Destination" blocks to no avail.
As I understand it, It blocks all traffic to port 53 except the "allowed" IPs. Setting a black list would block ONLY the IP's set. Since it is impossible to know every possible alternative DNS, I do not believe that would work.

And why doesn't it seem that you use ALLOW and DENY at the same time?

Because they are contradictory. Allow blocks all except those excepted. Deny blocks only those listed. If you used both, how would the router now which rule gets priority?
Logged

Deleterious

  • Level 1 Member
  • *
  • Posts: 4
Re: Configure firewall for OpenDNS
« Reply #6 on: February 02, 2016, 09:08:12 PM »

I think the issue I'm seeing is in your own comment.. If "Allow" only allows traffic that's specified, then your rule will block all traffic BUT DNS traffic to those servers as no other port is whitelisted.  That would certainly seem to be in line with what I was seeing.
Logged

FurryNutz

  • Poweruser
  •   ▲
    ▲ ▲
  • *****
  • Posts: 47763
  • D-Link Global Forum Moderator
    • Router Troubleshooting
Re: Configure firewall for OpenDNS
« Reply #7 on: February 16, 2016, 07:47:29 AM »

Any status on this?  ???

I think the issue I'm seeing is in your own comment.. If "Allow" only allows traffic that's specified, then your rule will block all traffic BUT DNS traffic to those servers as no other port is whitelisted.  That would certainly seem to be in line with what I was seeing.
Logged
Cable:200mb/10Mb>NetGear C7800>DIR-882>DGS-1100>HP 24pt Gb Switch. COVR-3902/2202/1203,DIR-2680,890L,882,880L,868L,DNR-202L,DNS-345x2,DCS-933L,936L and 960L.
Go Here>Router Troubleshooting