How to use QQ Filter of Vigor3900
- DrayOS 4, imported, firewall_filter, vigor3900, account_blocking, account_allowlist, qq_filter, source_ip_range
We can set the QQ Filter to pass or block certain QQ account. In this note, we assume that Tencent QQ is prohibited in the IP range 192.168.1.20~192.168.1.50 (R&D department), while a certain ID is allowed in the IP range 192.168.1.60~192.168.1.80 (FAE department).
1. Go to Objects Setting >> QQ Object. Type Profile name, click Add in id, type a QQ ID, and click Apply.
2. We will see the result like the following.
3. To apply the above settings to the firewall. Go to Firewall >> Filter Setup >> QQ Filter. Click Add.
4. Type Profile name, check Enable and click + to edit IP Object.
5. Type profile name, select "Range" for Address Type, enter Start IP Address and End IP Address.
6. Select the profile FAE for Source IP and profile FAE for QQ Account Pass. Choose "all" for QQ Account Block, and click Apply.
7. To prevent R&D from using Tencent QQ, add another profile. Type Profile name, check Enable and click + to edit IP Object.
8. Type profile name, select "Range" for Address Type, enter Start IP Address and End IP Address.
9. Select RD for Source IP, chose all for QQ Account Block, and press Apply
10. We will see the result below.
11. Go to System Maintenance >> Syslog / Mail Alert >> Syslog File. We will find firewall rules are executed successfully.
Notice that QQ Account Block has a higher priority than QQ Account Pass. And If no match in the block and pass lists, the account will be passed.
- Details
Difference between DNS Filter Profile and DNS Filter Local Setting
- DrayOS 4, imported, dns_filter, firewall_rules, lan_clients, dns_settings, router_dns
DNS Filter is a feature to filter the websites by examining the DNS queries. In CSM >> DNS Filter page, there are two parts of the settings, which are DNS Filter Profile and DNS Filter Local Setting (as the following image shows). We only need to use one of them to make DNS filter work, and the choice depends on what DNS server is the client using.
When to use DNS Filter Profile?
If LAN client is using an external DNS server, which means the DNS queries are sent to WAN, then we should create DNS Filter Profile and use it in Firewall rules.
You may check the DNS server of a network adapter by the command ipconfig/all. Below is an example when LAN client is using an external DNS server.
When to use DNS Filter Local Setting?
If LAN client is using the router as DNS server, which means the DNS queries are sent to the router itself, then we should use DNS Filter Local Setting instead. DNS Filter Local Setting checks the DNS queries that destined to the router, but it does not filter the source IP. Therefore, note that once DNS Filter Local Setting is enabled, it will apply to all the LAN clients who use the router as DNS server.
Vigor routers also support Blacklist/Whitelist on Local DNS Filter to specify firewall for different users.
Below is an example result of ipconfig/all command when LAN client is using the router as DNS server.
- Details
DNS Security
- DrayOS 4, imported, wan_interface, dns_security, dnssec, bogus_dns_response, domain_diagnose, dns_validation
DNS Security is based on Domain Name System Security Extensions (DNSSEC), which is a specification to add security to the Domain Name System (DNS). By the use the digital signatures, the DNS server can provide the DNS data integrity and origin authentication to the DNS clients. If you enable DNSSEC on Vigor Router, before asking for the address of a domain name, the router will perform iterative queries for DNSKEY and RRsig to validate the information provided by the DNS servers, thus to avoid receiving bogus DNS responses. To enable DNS Security on a WAN interface:
1. Go to Application >> DNS Security, select the WAN interface to which you would like DNSSEC to apply and click OK.
2. The router will check if the DNS server in use supports DNSSEC. This will take a few seconds. After that, if it shows a green lock icon before the DNS server IP, it means the DNS server does support DNSSEC. But if it shows a gray lock icon instead, it means the DNS server does not support DNSSEC. You may change the DNS server from WAN >> Internet Access >> Details Page.
3. Set the policy for a bogus DNS reply to 'Drop', so that the router will drop the DNS reply if it cannot verify the signature of it.
4. Note that if the domain name itself doesn't comply with DNSSEC, the router will not be able to verify the DNS query. You may check if a domain name supports DNSSEC or not via the Domain Diagnose tab.
- Details
Use Vigor3900/2960 to block Youtube for some of LAN clients only
- DrayOS 4, imported, firewall_filter, ip_filter, lan_dns, youtube_block, dns_redirection, google_safesearch
This note is going to show how to stop some LAN clients from Youtube but still pass some other LAN clients. Since Google service (e.g., google maps, google drive) and Youtube sometimes uses the same IP address, using URL/Web Category Filter to block YouTube may block some of the Google services as well. However, we can use LAN DNS and IP Filter to prevent clients from accessing YouTube, and make sure other Google services are still available.
1. Set up LAN DNS for LAN clients to use SafeSearch Virtual IP for Google services: Go to LAN >> LAN DNS, click Add to establish a profile:
- Check Status
- Enter
google.comin Domain Name - Enter
*google.com*in Alias Domain Name and save it - Enter SafeSearch Virtual IP in IP Address (Note: Google SafeSearch IP can be found by doing nslookup for
forcesafesearch.google.com) - Click Apply to finish the setting.
2. Force LAN DNS Redirection: Go to LAN >> General Setup, click on the LAN profile in use and enable DNS Redirection.
3. Add a IP Filter Group: Go to Firewall >> Filter Setup >> IP Filter, click Add:
- Check Enable
- Enter Group name
- Click Apply
4. Create an IP Filter to pass all the traffic from a group of IP which is allowed to watch Youtube. Click on the group created in step 3, and click Add to add a rule:
- Enter Profile name
- Select "Accept" for Action
- Check Enable
- Click Add on the right of Source IP Object. Select "Range" for Address Type and set Start IP Address and End IP Address of the IP which is allowed to access Youtube
5. Select the Object after it was created, then click Apply to finish IP filter setting
6. Create an IP Filter to pass all traffic destined to other Google service, similar to Step 4. Click Add to establish a rule:
- Enter profile name
- Select "Accept" for Action
- Check Enable
- Click Add on the right of Destination IP Object. Select "Single" for Address Type and enter Google SafeSearch IP at Start IP Address
- Select the Object created, then click Apply to finish IP filter setting
7. Add another an IP filter rule to block DNS queries for Youtube:
- Enter Profile name
- Select "Block" for Action
- Check Enable
- Click Add on the right of Destination DNS Object. Add "youtube.com" in Member Table and click Save
- Select the Object created, then click Apply to finish IP filter setting
With the above configuration, clients with IP between 10.0.0.1~10.0.0.100 can access Youtube; but other clients can't because the DNS queries for YouTube from them are blocked. However, all the clients can access other Google services by the SafeSearch IP.
Trouble-Shooting:
If YouTube is not blocked as expected, please try:
- Clear Browser's history
- Clear DNS cache. For Windows users, this can be done by typing
ipconfig/flushdnsin command prompt. - Make sure the client's default gateway is the Vigor Router.
- Details
Protect the LAN clients by OpenDNS FamilyShield service (Vigor3900/2960)
- DrayOS 4, imported, lan_clients, vigor3900, vigor2960, dns_filtering, familyshield, firewall_ip_filter, opendns
OpenDNS provides the free Family Shield service that helps screen out potentially objectionable content that you may prefer not to see or don't want others in your family to stumble across. To use the service, we need to use Open DNS IP 208.67.222.123 and 208.67.220.123 as the DNS server IP. The example below will show how to configure Vigor3900 to use the OpenDNS as the DNS server and block specific LAN clients from using other DNS servers, thus to make them be protected by the Family Shield service.
1. Assign OpenDNS server IP to LAN DHCP Clients: Go to LAN >> General Setup, and click on the LAN profile in use.
- Click Add in DHCP DNS
- Enter IP
208.67.222.123and208.67.220.123, and click Save - Click Apply to save the changes
2. Create IP objects for Open DNS server IP. Go to Objects Setting >> IP Object, and click Add to create a new profile.
- Enter Profile name
- Select "Single" for Address Type
- Enter
208.67.222.123for Start IP Address - Click Apply to save the changes
3. Similarly, create another IP object for another Open DNS server IP. Go to Objects Setting >> IP Object, and click Add to create a new profile.
- Enter Profile name
- Select "Single" for Address Type
- Enter
208.67.220.123for Start IP Address - Click Apply to save the changes
4. Create an IP object for the LAN PC's IP that you would like to protect. Go to Objects Setting >> IP Object, and click Add to create a new profile.
- Enter Profile name
- Select "Single" for Address Type
- For Start IP Address, enter the IP of the LAN PC you'd like to protect
- Click Apply to save the changes
5. Go to Firewall >> IP Filter, and click Add to create an IP Filter Group profile.
- Enter Group profile name
- Check Enable
- Click Apply to save the changes
6. Create a Firewall IP Filter rule to pass all packets to the OpenDNS server IP address. Go to Firewall >> IP Filter >> Child_Protect, and click Add to create an IP Filter rule.
- Enter a rule profile name
- Check Enable
- Select "Accept" for Action
- Select the LAN profile in use for Input Interface
- Select the WAN profile in use for the Output Interface
- In the Destination IP area, select the OpenDNS objects we just created
- Click Apply to save the changes
7 Create another Firewall IP Filter rule to block the DNS packets from Child PC's IP address to any other IP address. Go to Firewall >> IP Filter >> Child_Protect, and click Add to create an IP Filter rule.
- Enter a rule profile name
- Check Enable
- Select "Block" for Action
- Select the LAN profile in use for the Input Interface
- Select the LAN profile in use for the Output Interface
- In the Service Protocol area, select "DNS" for Service Type Object
- In the Source IP area, select the IP Object Child_PC we created
- Click Apply to save the changes
8. After completing the above configurations, Child's PC won't be able to query other DNS servers about domain names. They can only use the OpenDNS FamilySheild server.
9. While the child tries to browse a website that contains content improper for children, it will be blocked by OpenDNS Family Shield service
- Details
